Answered Using Windows Task Scheduler C#

  • Saturday, April 07, 2012 7:49 AM
     
     

    My application requires a re-start at midnight time daily. For this job, according to me, the task scheduler would be the ideal thing to use but I haven't been able to find how to use the Task Scheduler APIs in C# (no external libraries to be used)

    Perhaps, I would have to use the COM reference for the Task Scheduler, but it would be good if somebody could point to a simple example on how to use this in C#, so I could get started.

    Once starting the application from Task Scheduler is done, I also wanted suggestions how to shutdown the application automatically at a certain time (even if the app at that particular time might be unresponsive, displaying some error message box or not working due to some problem)

All Replies