Inactivate or pause execution of scheduled tasks?

Is it possible to programmatically temporarily pause the execution of registered scheduled tasks? We would like to be able to inactivate the execution without having to change the tasks configuration and restart the application.

(This is a similar question with a solution , however it’s not feasible in our case.)

Litium version: 7.4

A very simple solution could be a website setting with a IF statement in the task. (If you have more then 1 website you might need to get the specific website, or use a setting on another level)

public void ExecuteTask(SecurityToken token, string parameters)
{
    if(_websiteSettings.PauseTask1)
    {
       return;
    }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.