Tuesday, July 25, 2023

Re: Need to trigger action on 4th Saturday of the month

On 25/07/2023 10:47 pm, M Cain wrote:
User application permits registration for upcoming events.  User wants the registration page to be open on 4th Saturday of every month at 9am ET as the events are very popular with limited capacity and made available on first come first serve basis.  

Django application is deployed on Heroku. Heroku scheduler works except it doesn't 'guarantee' running at specific time (but near the requested time). 

Would celery-redis be better for this? 

Any other suggestions?

I wrote baklabel.py to produce grandfather back-up label fragments such as "mon", "tue" etc and "fri_1", "fri_2" etc as well as month-end and year-end label fragments. It has no dependencies and accepts args so you could change "fri_1" etc to "sat_1".

If you called it at 9am ET every day it would tell you "sat_4" once per month.

There are options to nullify month-end and year-end which you would need to employ to prevent them from spoiling "sat_4" if it fell on a month-end or year-end.

pip install baklabel

https://github.com/mdewhirst/baklabel

Cheers

Mike


Thank you in advance for replying. 
--
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/c1af9c55-b2dd-4ab2-af1d-ce5dec4c4ca6n%40googlegroups.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