Django 西芹每年一次,每秒执行一次任务

Django 西芹每年一次,每秒执行一次任务,django,celery,djcelery,Django,Celery,Djcelery,我试图在一天的最后1/1运行一个任务。所以,我写了这个: @periodic_task(run_every = crontab( day_of_month=1, month_of_year=1, hour=23, minute=51) ) def tell_admins_about_completed_updates(): logging.info('Updates to period instances are complete', extra={ 't

我试图在一天的最后1/1运行一个任务。所以,我写了这个:

@periodic_task(run_every = crontab(
    day_of_month=1, month_of_year=1, hour=23, minute=51)
)
def tell_admins_about_completed_updates():
    logging.info('Updates to period instances are complete', extra={
            'tell_admins': True,
            'email_content': 'Please check that new instances are displaying '
                'properly'
        }
    )
使用crontab,我看到这个任务每秒都在运行。如果我将hour的值更改为0,我看不到它执行(可能是因为时间不对)。还有其他人观察到这种行为吗?我错过了一些基本的东西吗

编辑:我再次检查。如果我像上面建议的那样改变年中的月(而不是小时),行为似乎会改变。需要说明的是,如果crontab配置为
月日=31,年月日=12,小时=0,分钟=49
,则它似乎可以工作(即,我没有看到任务每秒运行一次)。如果crontab配置为
月中日=31,年中月=1,小时=0,分钟=49
,则它不工作(即,我看到任务每秒运行一次)。非常奇怪