6 comments

[ 3.3 ms ] story [ 27.1 ms ] thread
I understand celery is the other way to do this? Can I replace celery based schedule with this one? Seems much simpler..
Schedule does not have persistence. When the python process stops you lose all jobs.
For a Django app, I use JSON serialisation of input data to store jobs in an sqlite database. the function to run is stored as a python path; a string, that is evaluated when the job is ran. result or exceptions are written to database. That way I can get away with the standard library's schedule just fine. Of course, for these specific jobs it's ok if they run more than once so there's no mutexes needed.
What’s the advantage of this over, say, running your job as a true Unix or Kubernetes level cronjob?