Skip to content

Commit ee271ba

Browse files
fix: Cron entries of period tasks (#6850)
1 parent c480da1 commit ee271ba

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

app/api/helpers/scheduled_jobs.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,17 +302,27 @@ def send_monthly_event_invoice():
302302
def setup_scheduled_task(sender, **kwargs):
303303
from celery.schedules import crontab
304304

305-
sender.add_periodic_task(crontab(hour='*/5', minute=30), send_after_event_mail)
306-
sender.add_periodic_task(crontab(minute=0, hour=0), send_event_fee_notification)
305+
# Every day at 5:30
306+
sender.add_periodic_task(crontab(hour=5, minute=30), send_after_event_mail)
307+
# Every 1st day of month at 0:00
308+
sender.add_periodic_task(
309+
crontab(minute=0, hour=0, day_of_month=1), send_event_fee_notification
310+
)
311+
# Every 1st day of month at 0:00
307312
sender.add_periodic_task(
308313
crontab(minute=0, hour=0, day_of_month=1), send_event_fee_notification_followup
309314
)
315+
# Every day at 5:30
310316
sender.add_periodic_task(
311-
crontab(hour='*/5', minute=30), change_session_state_on_event_completion
317+
crontab(hour=5, minute=30), change_session_state_on_event_completion
312318
)
319+
# Every 45 minutes
313320
sender.add_periodic_task(crontab(minute='*/45'), expire_pending_tickets)
321+
# Every 1st day of month at 0:00
314322
sender.add_periodic_task(
315323
crontab(minute=0, hour=0, day_of_month=1), send_monthly_event_invoice
316324
)
317-
sender.add_periodic_task(crontab(minute=0, hour='*/5'), event_invoices_mark_due)
325+
# Every day at 5:00
326+
sender.add_periodic_task(crontab(minute=0, hour=5), event_invoices_mark_due)
327+
# Every 5 minutes
318328
sender.add_periodic_task(crontab(minute='*/5'), delete_ticket_holders_no_order_id)

0 commit comments

Comments
 (0)