mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 15:29:36 +02:00
Fix scheduler
This commit is contained in:
parent
4241a1024e
commit
91ef71da7a
4 changed files with 37 additions and 9 deletions
|
@ -1,5 +1,3 @@
|
|||
# scheduler.py
|
||||
|
||||
import logging
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from django_apscheduler.jobstores import DjangoJobStore
|
||||
|
@ -25,12 +23,11 @@ def start_scheduler():
|
|||
scheduler.add_job(
|
||||
run_worldtravel_seed,
|
||||
trigger="interval",
|
||||
hours=24,
|
||||
minutes=3,
|
||||
id="worldtravel_seed",
|
||||
max_instances=1,
|
||||
replace_existing=True,
|
||||
)
|
||||
|
||||
logger.info("Starting scheduler...")
|
||||
scheduler.start()
|
||||
return scheduler
|
||||
scheduler.start()
|
Loading…
Add table
Add a link
Reference in a new issue