Issue Feature Closed

#109110Introduce scheduler task priority

Sebastian Michaelsen 02/26/26, 13:43 updated 03/31/26, 08:09

Description

Currently when multiple scheduler tasks are due to run when the scheduler is invoked it picks the task that is “longest overdue” and no further tie breaker.

That means you can never really ensure that a scheduled task will actually run at the specified time, because on the scheduler run on that time other tasks might be picked first and take long.

If you have a task that is time critical, that is a risk. Imagine you use the workspace publishing task, to publish content at a predefined time but then other tasks are picked first, that index content into solr, clean up the db, index files from the file system or fetch data from an slow API.

The suggestion to mitigate that risk is to introduce a simple High/Medium/Low priority flag for scheduler tasks.

Once selecting the next task to execute the scheduler would choose by priority first, and then “longest overdue” as a tie breaker. This gives the website administrators more control over the execution order and lets the prioritize time critical tasks.

Reviews 4