forked from Github/Axter-Stash
Updated comments
This commit is contained in:
@@ -135,15 +135,15 @@ def reoccurringScheduler():
|
||||
# Or replace schedule with apscheduler https://github.com/agronholm/apscheduler
|
||||
dayOfTheWeek = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]
|
||||
for task in plugin.pluginConfig['task_reoccurring_scheduler']:
|
||||
if 'days' in task and task['days'] > 0:
|
||||
plugin.Log(f"Adding to reoccurring scheduler task '{task['task']}' at {task['days']} days interval")
|
||||
schedule.every(task['days']).days.do(runTask, task)
|
||||
elif 'hours' in task and task['hours'] > 0:
|
||||
if 'hours' in task and task['hours'] > 0:
|
||||
plugin.Log(f"Adding to reoccurring scheduler task '{task['task']}' at {task['hours']} hours interval")
|
||||
schedule.every(task['hours']).hours.do(runTask, task)
|
||||
elif 'minutes' in task and task['minutes'] > 0:
|
||||
plugin.Log(f"Adding to reoccurring scheduler task '{task['task']}' at {task['minutes']} minutes interval")
|
||||
schedule.every(task['minutes']).minutes.do(runTask, task)
|
||||
elif 'days' in task and task['days'] > 0:
|
||||
plugin.Log(f"Adding to reoccurring scheduler task '{task['task']}' at {task['days']} days interval")
|
||||
schedule.every(task['days']).days.do(runTask, task)
|
||||
elif 'weekday' in task and task['weekday'].lower() in dayOfTheWeek and 'time' in task:
|
||||
plugin.Log(f"Adding to reoccurring scheduler task '{task['task']}' (weekly) every {task['weekday']} at {task['time']}")
|
||||
if task['weekday'].lower() == "monday":
|
||||
|
||||
@@ -18,18 +18,18 @@ config = {
|
||||
"runCleanAfterDelete": False,
|
||||
|
||||
# The reoccurring scheduler task list.
|
||||
# For best results use the scheduler with FileMonitor running as a service.
|
||||
# Frequency can be in minutes, hours, or days. A zero frequency value disables the task.
|
||||
# Task can be scheduled to run monthly, weekly, hourly, and by minutes. For best results use the scheduler with FileMonitor running as a service.
|
||||
# The frequency field can be in minutes or hours. A zero frequency value disables the task.
|
||||
# For weekly and monthly task, use the syntax as done in the **Generate** and **Backup** task below.
|
||||
"task_reoccurring_scheduler": [
|
||||
{"task" : "Clean", "days" : 2}, # Maintenance -> [Clean] (every 2 days)
|
||||
{"task" : "Clean", "hours" : 48}, # Maintenance -> [Clean] (every 2 days)
|
||||
{"task" : "Auto Tag", "hours" : 24}, # Auto Tag -> [Auto Tag] (Daily)
|
||||
{"task" : "Optimise Database", "hours" : 24}, # Maintenance -> [Optimise Database] (Daily)
|
||||
|
||||
# The following is the syntax used for plugins. A plugin task requires the plugin name for the [task] field, and the plugin-ID for the [pluginId] field.
|
||||
{"task" : "Create Tags", "pluginId" : "pathParser", "days" : 0}, # This task requires plugin [Path Parser]. To enable this task change the zero to a positive number.
|
||||
{"task" : "Create Tags", "pluginId" : "pathParser", "hours" : 0}, # This task requires plugin [Path Parser]. To enable this task change the zero to a positive number.
|
||||
|
||||
# Note: For a weekly task do NOT use days. Instead use the weekday method which is more reliable. The hour section in time MUST be a two digit number, and use military time format. Example: 1PM = "13:00"
|
||||
# Note: For a weekly task use the weekday method which is more reliable. The hour section in time MUST be a two digit number, and use military time format. Example: 1PM = "13:00"
|
||||
{"task" : "Generate", "weekday" : "sunday", "time" : "07:00"}, # Generated Content-> [Generate] (Every Sunday at 7AM)
|
||||
{"task" : "Scan", "weekday" : "sunday", "time" : "03:00"}, # Library -> [Scan] (Weekly) (Every Sunday at 3AM)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user