The following sample code shows how you can run an existing scheduled task:
[C#]
using CMS.Scheduler;
...
string taskName = "TestContentPublishing"; string siteName = "CorporateSiteASPX";
// Get task object TaskInfo ti = TaskInfoProvider.GetTaskInfo(taskName, siteName);
// If task exists if (ti != null) { // Run task SchedulingExecutor.ExecuteTask(ti);
} |
Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?api_running_a_scheduled_task.htm