Question Display Windows Scheduled Tasks

DEvans

New member
Joined
Sep 4, 2012
Messages
3
Programming Experience
10+
Using Visual Studio 2010. (Newbie)
I am looking for sample code that will retrieve a list of started tasks from a windows server (2008 R2) - along with details of each task such as Triggers, Actions, Conditions, Settings, and History. I have searched several examples but they seem to be outdated or a bit complicated for what I need. Looking for a straightforward way to do this? thanks in advance for any samples.
 
There is no straightforward way to do it because there is no specific managed interface. Basically, you need to invoke the commandline version of the Windows Scheduled Tasks, send it commands and then parse the output. It's just like you opening a command prompt, running the program, entering commands and reading the output, except that you're doing it all in code. Unless someone has written a managed wrapper around that, you will not find anything simple to achieve your aim.
 
Back
Top