bazarr/scheduler.py

12 lines
678 B
Python
Raw Normal View History

2017-10-23 11:00:11 +08:00
from get_series import *
from get_episodes import *
from get_subtitle import *
2017-10-17 07:27:19 +08:00
2017-10-23 11:00:11 +08:00
from apscheduler.schedulers.background import BackgroundScheduler
2017-10-17 07:27:19 +08:00
2017-10-23 11:00:11 +08:00
scheduler = BackgroundScheduler()
2017-10-23 11:33:23 +08:00
scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesce=True, id='update_series', name='Update series list from Sonarr')
scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, id='add_new_episodes', name='Add new episodes from Sonarr')
scheduler.add_job(wanted_search_missing_subtitles, 'interval', minutes=15, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles')
2017-10-23 11:00:11 +08:00
scheduler.start()