Wednesday, October 25, 2023

Re: Management command scheduling options

On Wed, 2023-10-25 at 08:24 -0400, Larry Martell wrote:
On Wed, Oct 25, 2023 at 5:35 AM Mike Dewhirst <miked@dewhirst.com.au> wrote:

Ahmedrufai

I looked at APScheduler and like Celery it is too much of a sledgehammer for my tiny problem.

I ended up using cron to launch the command each day. It works perfectly.

My task now is to find a way to automate establishment of that crontab entry when the project is migrated to a new server.

How are new servers deployed? How many new servers will be deployed?
If it's a one off thing you are doing manually, you just have to
remember to do it. If there are many, then you should use a tool like
terraform or octopus, or something similar and have that do it.


I use django-crontab myself for cron jobs. That way, I can add or update easily during deployment. Maybe you can make use of that so you can keep everything in your project.

-- 
Adam (adam@csh.rit.edu)    

No comments:

Post a Comment