调接口的任务改为每天上午9点执行一次

This commit is contained in:
mark.tian
2025-12-09 21:58:49 +08:00
parent ae9b548311
commit 34520d4113
3 changed files with 6 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
Celery应用配置
"""
from celery import Celery
from celery.schedules import crontab
from app.config import settings
from app.logger import get_celery_logger
@@ -36,7 +37,7 @@ celery_app.conf.update(
},
'daily-morning-task': {
'task': 'call_api',
'schedule': '120.0'
'schedule': crontab(hour=9, minute=0) # 每天上午9点执行
},
},
)