From 81962ab9e71319f7ed9d57006f4ed9c3210ae1f1 Mon Sep 17 00:00:00 2001 From: moanos Date: Sun, 31 Aug 2025 20:41:10 +0200 Subject: [PATCH] fix: Make sure tasks are only executed once per hour --- src/notfellchen/celery.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/notfellchen/celery.py b/src/notfellchen/celery.py index f441e53..cb51634 100644 --- a/src/notfellchen/celery.py +++ b/src/notfellchen/celery.py @@ -14,19 +14,20 @@ app.autodiscover_tasks() app.conf.beat_schedule = { 'daily-cleanup': { 'task': 'admin.clean_locations', - 'schedule': crontab(hour=2), + 'schedule': crontab(hour=2, minute=11), }, 'daily-unchecked-deactivation': { 'task': 'admin.daily_unchecked_deactivation', - 'schedule': crontab(hour=1), + 'schedule': crontab(hour=1, minute=6), }, 'daily-404-deactivation': { 'task': 'admin.deactivate_404_adoption_notices', - 'schedule': crontab(hour=3), + 'schedule': crontab(hour=3, minute=45), }, 'daily-fedi-post': { 'task': 'social_media.post_fedi', - 'schedule': crontab(hour=19), + # At minute 5 past every hour from 17 through 21. + 'schedule': crontab(hour='17-21', minute=5), }, }