安装:
# pip3 install apscheduler==2.1.2
使用:在Django项目settings.py同级urls.py
from apscheduler.scheduler import Scheduler sched = Scheduler() @sched.interval_schedule(seconds=60) def my_task(): print("Hello Scheduler") sched.start()
2023-11-14 20:12:40
安装:
# pip3 install apscheduler==2.1.2
使用:在Django项目settings.py同级urls.py
from apscheduler.scheduler import Scheduler sched = Scheduler() @sched.interval_schedule(seconds=60) def my_task(): print("Hello Scheduler") sched.start()
下一篇:Maven 项目