Feature: scheduled workflow trigger (#8036)

This commit is contained in:
shamoon
2024-11-24 10:22:31 -08:00
committed by GitHub
parent d5572137de
commit 2b29233a1e
16 changed files with 907 additions and 78 deletions

View File

@@ -216,6 +216,17 @@ def _parse_beat_schedule() -> dict:
"expires": 23.0 * 60.0 * 60.0,
},
},
{
"name": "Check and run scheduled workflows",
"env_key": "PAPERLESS_WORKFLOW_SCHEDULED_TASK_CRON",
# Default hourly at 5 minutes past the hour
"env_default": "5 */1 * * *",
"task": "documents.tasks.check_scheduled_workflows",
"options": {
# 1 minute before default schedule sends again
"expires": 59.0 * 60.0,
},
},
]
for task in tasks:
# Either get the environment setting or use the default