jollyrancher82 Posted April 1, 2008 Share Posted April 1, 2008 I have been working on a Cron implementation for Windows using C# and the .NET 3.5 framework. It will offer similar functionality to the Unix Cron daemon, but for Windows. A unique part of my implementation of Cron is the XML configuration file which is XML rather than plaintext. Below is an example CronTab.xml. <?xml version="1.0" encoding="UTF-8"?> <CronTab> <!-- Run SomeExecutable.exe every quarter past the hour --> <CronJob> <Schedule> <Minute>15</Minute> <Hour>*</Hour> <DayOfMonth>*</DayOfMonth> <Month>*</Month> <DayOfWeek>*</DayOfWeek> </Schedule> <Task arguments="--some-argument">C:Program FilesSomeAppSomeExecutable.exe</Task> </CronJob> <!-- Run SomeBatchFile.bat every 5 minutes on Sunday --> <CronJob> <Schedule> <Minute>*/5</Minute> <Hour>*</Hour> <DayOfMonth>*</DayOfMonth> <Month>*</Month> <DayOfWeek>7</DayOfWeek> </Schedule> <Task arguments="">C:SomeBatchFile.bat</Task> </CronJob> </CronTab> I use LINQ to XML to parse this, and further string parsing for the schedule elements. The first release will have some limitations which will be outlined when it is released, but should be sorted out before the second release. Below is a screenshot of the class diagram for the Cron service. http://farm3.static.flickr.com/2354/2378370591_7f1591947e.jpg[/img] The first beta of my Cron service should be available before the end of the week. I am also going to be adding such functionality as recoverability and email notification in the release after the beta, after any bugs that have been found are fixed. If you have any other sensible suggestions for features, please contact me. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.