by hprotagonist · 6y ago · 0 comments
You pass cron the full path to your entry point. Where’s the rigamarole?
0 0 * * * /path/to/bash/script/to/init/pyenv && /my/path/to/poetry run /my/path/to/python.py -arg1
0 0 * * * /path/to/interpreter/created/by/poetry/bin/python myscript.py
An anecdote: Homebrew uses this method for shipping python executables.
The exception is if your python thingy is "the main thing" running on a server, i.e. your customer facing webapp.
My $.10 anyway
This of course leads to other issues to solve, now that your development environment doesn't actually mirror production.