Logo HeaderGraphic
"... A Yankee in the Land of The Long White Cloud, Aotearoa ..."

CodeProject: A Task Scheduler Class Library for .NET. 

 

CodeProject: A New Task Scheduler Class Library for .NET. The article title says it’s “new” but don’t be fooled, this thing is Very Old (originally created circa 2000), but in this case old doesn’t necessarily mean out of date.

My client’s project called for scheduling a task (background synchronization of data from a satellite to a controller) and originally we had started down the path of setting up our own scheduler, database tables, task definition, etc.  Oy Vay, just a few weeks into it, and I realised we were looking at a time black hole.  And what’s more, it didn’t make sense, Windows Server had a perfectly good task scheduler.  If you can buy a wheel (or even better pick it up for free) don’t reinvent it, unless you have no choice.

Problem was the system for creating a task in the windows  task scheduler for our application, while not difficult, wasn’t very elegant.image

Here in our app, you would have to select the item you wanted to schedule, right mouse click, select the task you wanted to create, and that gets you a command line string put into your clipboard.

"C:\src\Rincon\DataExportImport\UILayer\Schedule\Administer\bin\Debug\RinconDeiSynchronization.EXE" 
	/DBCONNECTIONNAME=IPaintDbController /TARGETNAME=Felling /TRANSMISSIONDIRECTION=SEND

Now you had to go to Task scheduler and create a new task and of course, you couldn’t just paste that command line into the browse dialog when creating a new task, because of course in windows server 2003, the new task wizard won’t take that command, instead you have to break it apart and put it in after you have created the task.  I could give you a whole bunch of screen shots, but let’s just say, in the end it wasn’t very user friendly.

So the answer was to see if there was something that would allow me to create a new task programmatically  (and it had to work in Windows Server 2003, Windows XP, Windows Vista, Windows Server 2008).

So with a little google and CodeProject, I found this library, which will definitely give us a better solution.

Technorati Tags:
Digg This
 
Posted on 10-Apr-09 by Matthew C. Hintzen
Bookmark this post with:        
Tags: