Run Django manage.py command from cron

How do you call/ execute a custom Django management command from a cron job?

I have a webservice running Django with a custom manage.py command that I would like to run periodically. I have created a cron job but I am not sure how to reference the Django instance. Any help is greatly appreciated.
thanks

Hey there,

So cron services are their own instance - they don’t reference others instances. You’d have to setup the cron service with all the same code/vars etc as your web-service and then use the command you want as the cron command. If you’re sharing environment variables across services then using Environment variable groups are really helpful here,

Regards,

John B

Thanks John, that is what I though

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.