Marc Escher ( http://mxunit.org/ ) gave a great presentation at CFUnited on automation: batch files, Ant, launchers and Jetty. One thing that came up during the discussion was a replacement for Scheduled Tasks on Windows which I (and apparently others) have found unreliable.
Since I'm a Linux geek I'm familiar with cron on Linux and went looking for a version for Windows.
Cron enables users to schedule jobs (commands or shell scripts) to run automatically at a certain time or date.
Turns out there are quite a few cron solutions available on Windows. Most of them however were commercial solutions. After a bit of digging I found nnCron ( http://www.nncron.ru/ ). nnCron has a commercial version but they offer a free "lite" version which covered the basic features I needed:
nnCron LITE is a small, but full-featured scheduler that can start applications and open documents at a specified time or with specified frequency. nnCron LITE is a perfect freeware Windows clone of a well-known UNIX scheduler Cron (including all the useful Anacron features).
Here are a few of the features of nnCron LITE:
- it can be started as a system service or as a regular standalone application
- it understands cron table format (Unix) and is managed with easy-to-edit text crontab files that are fully compatible with Unix crontabs
- it can set and use environment variables
- it can run applications authorized as currently logged user
So far I've been using it to schedule a backup task I have for our JIRA and Confluence installs using SyncBack. And I have a few system utilities setup (defrag, etc) that run occasionally. Unlike Scheduled Task I've never had an issue with the nnCron service failing.