Skip to content

Commit

Permalink
Sync postcodes weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
baarkerlounger committed Feb 20, 2025
1 parent 2e2f933 commit c4d9f03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cron-scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
EVERY_TWO_AM,
HALF_DAY_IN_SECONDS,
ONE_HOUR_IN_SECONDS,
EVERY_WEEK,
)
from datahub.core.queues.health_check import queue_health_check
from datahub.core.queues.job_scheduler import job_scheduler
Expand Down Expand Up @@ -159,7 +160,7 @@ def schedule_jobs():
)
job_scheduler(
function=postcode_data_identification_task,
cron=EVERY_MIDNIGHT,
cron=EVERY_WEEK,
description='Identify new Postcode objects and schedule their ingestion',
)

Expand Down
2 changes: 2 additions & 0 deletions datahub/core/queues/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@
THIRTY_MINUTES_IN_SECONDS = 60 * 30
ONE_HOUR_IN_SECONDS = 60 * 60
HALF_DAY_IN_SECONDS = 12 * ONE_HOUR_IN_SECONDS

EVERY_WEEK = '0 0 * * MON'

0 comments on commit c4d9f03

Please sign in to comment.