How to create a Task Scheduler App.

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-06-11T21:01:17Z Indexed on 2010/06/11 21:23 UTC
Read the original article Hit count: 428

I have been task with (ha) creating an application that will allow the users to schedule a command line app we have with a parameter.

So the command line app takes an xml and "runs it"

So bottom line I either need to create a windows service or learn how to interact with the Task Scheduler service already running on the box (version 1 Xp /2003)

At first I though it would be easy have a service run and when a job is submitted, calculate the time between now and run and set up a timer to wait that amount of time. This is better then checking every minute if it's time to run.

Were I hit a wall is I relized I do not know how to communicate with a running windows service. Except maybe create a file with details and have the service with a file watcher to load the file and modify the schedule.

So the underlying questions are how can I execute this psedo code

from client

 serviceThatIsRunning.Add(Job)

Or ineracting with the task schedule or creating .job files using c# 3.5

© Stack Overflow or respective owner

Related posts about c#

Related posts about windows-services