Reputation: 25
I am using ScheduledTasks over at: http://www.codeproject.com/KB/cs/tsnewlib.aspx
Although I can't seem to find an example of how you delete a Scheduled Task in thier documentation, although they state you can do, could someone provide a basic example please
Upvotes: 2
Views: 4655
Reputation: 155
yea, its the part of library.
public static ScheduledTasks ScTask = null
ScTask .DeleteTask("Task Name")
Upvotes: 0
Reputation: 41393
From your link:
You use a ScheduledTasks object to access the individual tasks. Each task has a name, the same as its file name without the extension. From the ScheduledTasks object you can obtain the names of all the tasks currently scheduled. There are methods to create, open and delete tasks, all of which use the task's name.
So it would be:
ScheduledTasks st = new ScheduledTasks(@"\\DALLAS");
st.DeleteTask("name");
Upvotes: 2