How to create new Scheduled Task Programmatically?
-
Sunday, July 12, 2009 1:27 PMI am interested in creating a new scheduled task for Vista / Windows 7 and I am intersted in doing in programmatically for my program. For windows XP I used:
System.Diagnostics.Process.Start("schtasks", @"/create /tn TestTast /tr C:\test.exe /sc daily /st 18:55:00");
How would I go about doing this for Vista / Windows 7 programmatically, if I also wanted to 'select' the "Run task as soon as possible after a scheduled start is missed" option?
Thank you
M.Ahrens- Edited by Malte Ahrens Sunday, July 12, 2009 1:28 PM Fixed Formating Issue
All Replies
-
Sunday, July 12, 2009 2:19 PM
-
Monday, July 13, 2009 12:44 AM
Thank you for your reply, but I found help elsewhere. Also, most of the replies in the threads were talking about 'Task Scheduler 1.0' from XP not 'Task Scheduler 2.0' from Vista / Windows 7 and were therefore little use.
I have found what I wanted from this site: http://taskscheduler.codeplex.com/. It gives you a .NET wrapper and lets you use the wrapper for both XP & Vista / Windows 7, while still being able to use 'Task Scheduler 2.0' features.
M.Ahrens- Marked As Answer by Malte Ahrens Monday, July 13, 2009 12:44 AM
-
Friday, June 24, 2011 11:23 AM
Please refer the below article
http://topsearchforyou.com/2011/06/01/add-sheduled-task-to-windows-7-c-net-application/

