Home > OS >  Celery crontab to schedule 1 of the month and quarterly in year
Celery crontab to schedule 1 of the month and quarterly in year

Time:09-16

I have a celery task which executes quarterly on 1 of the month how can my month_of_year can be written

{
    'task': 'mytask',
    'schedule': crontab(day_of_month='1', month_of_year='')
},

CodePudding user response:

Use month_of_year='*/3' to run every quarter month

{
    'task': 'mytask',
    'schedule': crontab(0, 0, day_of_month='1', month_of_year='*/3')
},
  • Related