Jump to content

Invoking a Scheduled Task


chef

Recommended Posts

I'm attempting to trigger a Scheduled Task. But, my code doesn't seem to doing the job.

 

I believe I'm correct in finding what I need in the ITaskManager, although I have look under IScheduledTasks

            var t = taskManager.ScheduledTasks;
            foreach (var task in t.Where(task => task.Name == "Scan Media Library"))
            {
                await taskManager.Execute(task);
            }  
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...