1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-27 01:57:33 +00:00
bazarr/scheduler.py

14 lines
864 B
Python
Raw Normal View History

2017-10-23 03:00:11 +00:00
from get_series import *
from get_episodes import *
from get_subtitle import *
2017-11-07 05:17:14 +00:00
from check_update import *
2017-10-16 23:27:19 +00:00
2017-10-23 03:00:11 +00:00
from apscheduler.schedulers.background import BackgroundScheduler
2017-10-16 23:27:19 +00:00
2017-10-23 03:00:11 +00:00
scheduler = BackgroundScheduler()
2017-11-07 05:17:14 +00:00
scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, id='update_bazarr', name='Update bazarr from source on Github')
2017-10-23 03:33:23 +00: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 03:00:11 +00:00
scheduler.start()