Wednesday, October 25, 2023

Re: Management command scheduling options

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

wsB5BAABCAAjFiEE/NCg7Xf1UydoVFgpGvW31BqCOLMFAmU5w04FAwAAAAAACgkQGvW31BqCOLMw
Pwf+JWBiojxgNM7lXez5jSto2fuUWuFwkA2VtmWDicidm4S+QtCwVQpQpoYU2V8ZlPhf7SMuKlhw
bztXbxkbP8Jv9x4e+K2B8tXDO8pS9MgVuCZXt2aCG/+hDFThfBa9bqFZ7V8JEq/i1lQ5kfKQAjPX
9sMaz5jMfXEotZklkxm5BQfPWxKZw1uBW5P90QXlEeXpVbWITBPNczEmaDJy/Ajq/30hxoZdXif4
OnZK/DycCXu13H/uivNIgetMOD+KBwjfvsCIFGfMGWFHUokpRjk9hC6XpxS2kpeSytxo8n9X963w
jSKErzQ8JwQemYc9SzzUGXeMjY+QpqLV0IRMs0WTbg==
=sEQT
-----END PGP SIGNATURE-----
On 25/10/2023 11:49 pm, Adam Stein wrote:
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.

This looks excellent, Adam. Thanks. I'll report back in due course.

Mike



--   
Adam (adam@csh.rit.edu)    
--
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/6433ead4bf666e3ef52ac742df731e0cf7c66743.camel%40csh.rit.edu.


--   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