This commit is contained in:
David Maisonave
2024-08-09 15:11:22 -04:00
parent 0ee95c065c
commit 45ec460303
3 changed files with 8 additions and 6 deletions

View File

@@ -122,6 +122,8 @@ def runTask(task):
plugin.STASH_INTERFACE.run_plugin_task(plugin_id=task['pluginId'], task_name=task['task'])
def reoccurringScheduler():
import schedule # pip install schedule # https://github.com/dbader/schedule
# ToDo: Extend schedule class so it works persistently (remember schedule between restarts)
# Or replace schedule with apscheduler https://github.com/agronholm/apscheduler
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")

View File

@@ -5,7 +5,7 @@ url: https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/FileMonito
settings:
recursiveDisabled:
displayName: No Recursive
description: Enable stop monitoring paths recursively.
description: Enable to STOP monitoring paths recursively.
type: BOOLEAN
zzdebugTracing:
displayName: Debug Tracing
@@ -24,11 +24,11 @@ tasks:
description: Run as a SERVICE to monitors paths in Stash library for media file changes, and updates Stash. Recommended start method.
defaultArgs:
mode: start_library_monitor_service
- name: Start Library Monitor Plugin
description: Run as a plugin (not recommended method)
defaultArgs:
mode: start_library_monitor
- name: Stop Library Monitor
description: Stops library monitoring within 2 minute.
defaultArgs:
mode: stop_library_monitor
- name: Run as a Plugin
description: Run [Library Monitor] as a plugin (*not recommended method*)
defaultArgs:
mode: start_library_monitor

View File

@@ -17,7 +17,7 @@ config = {
# Enable to run metadata clean task after file deletion.
"runCleanAfterDelete": False,
# The scheduler my only work reliably when FileMonitor runs in command line mode (as a service)
# The scheduler my only work reliably when FileMonitor runs as a service.
# Enable to turn on scheduler_task_list
"turnOnScheduler": True,
# Reoccurring scheduler task list.