Monday, October 23, 2023

Re: Management command scheduling options

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEE/NCg7Xf1UydoVFgpGvW31BqCOLMFAmU29p0FAwAAAAAACgkQGvW31BqCOLO/
MAf/Rwial8qrW91DfWBFPk+dW+UGyG1bCw+ebFxdIPCNPpn7HtXavy0+DnF91kbHe7hCa1VbFciH
0k21rwnYh+YGAZPWJVJfbqAZtte/M0XoGpBSjVzfhaJBLS5JY6rpxAJ0ER/h7JfFmK3k3ur1IuTg
fSaZOV/hA5Clnmho8EdjrD48rru+kuK8i4qMiMNneqmORZUQGfXZeIhcaPSvgh0T4CQfgBph8UWU
yHqhiI6tsv/B/6Ojk9Im+OEDDITKXomPH1s4beFmulZcufC/be4U3k+6SwQQ7b8VQXqDmujH/VNQ
KL30J1zY0OMViA4uZBeLtn/lOTRSQ4JSpe/B34+8dw==
=0cjg
-----END PGP SIGNATURE-----
On 23/10/2023 11:48 pm, Rodrigo Bistolfi wrote:
Use devops for setting up cron jobs as part of the deployment process.

My requirement is very lightweight and cron would definitely work for me. Both Celery and APScheduler seem like overkill.

How would you ensure the cron job was established on a new server?

Mike

You could also use something like https://apscheduler.readthedocs.io/en/3.x/ if you wanna something OS independent.

El lun, 23 oct 2023 a las 7:08, Mike Dewhirst (<miked@dewhirst.com.au>) escribió:
Django docs suggest cron or Windows scheduler for running management commands.

I would like instead to build an internal Django based scheduler - because after migrating to a new server, setting up the new cron task will be forgotten.

Is there a daily (approximately) event in a Django project I can hook into and test the date?

The task is somewhat database intensive and needs to run quarterly for some users, monthly for most and weekly for others depending on their preferences.

Ideas anyone?

Thanks

Mike

--   Signed email is an absolute defence against phishing. This email has  been signed with my private key. If you import my public key you can  automatically decrypt my signature and be sure it came from me. Your  email software can handle signing.  
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7b29b24b-64f0-4f93-9a43-5d8f5e242b57%40dewhirst.com.au.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMQZ-Rf5sRxEZNEoGxHjh6f88FGsWHgTqCp%2BbUY4%2BH4GX3_7Kg%40mail.gmail.com.


--   Signed email is an absolute defence against phishing. This email has  been signed with my private key. If you import my public key you can  automatically decrypt my signature and be sure it came from me. Your  email software can handle signing.  

No comments:

Post a Comment