Add ScheduledTask programmatically Q&A

Hello!
Is it possible to add ScheduledTasks programmatically instead of through a tag in web.settings and if so how? I couldn’t find any information regarding this in the Litium .NET API or forums.

Thank you! :slight_smile:

Litium version: 7.4.2

I managed to find an answer to my question.
It is doable by using this:

Litium.Foundation.Solution.Instance.ScheduledTaskManager.RegisterScheduledTask(typeof(MyScheduledJob), TimeSpan.FromSeconds(1), TimeSpan.FromMinutes(1), null);

where MyScheduledJob inherits from ITask.

Thank you :slight_smile:

2 Likes

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