Introducing unix-style task scheduling for Windows 2000 and later.
Features
- Power Management aware Cron service
- Command line crontab tool to edit/delete/fetch individual crontabs
- POSIX style crontab file syntax
- Additional extensions allow scheduling tasks based on system events (such as start-up and power events).
- No need to save passwords when scheduling jobs
Limitations
- Only per-user crontabs are supported. There is no /etc/crontab equivalent.
- Executed processes are run without a login session. This prevents a certain amount of interaction with the desktop. This shouldn't be a problem, since cron scheduled tasks are not intended to receive user input.
- The output from executed commands is not captured by the cron service itself, and no email is sent. You need to redirect output somewhere appropriate if you wish to keep it.
Download
Crontab Syntax
In addition to the syntax documented here, this cron supports the following special events:
- @batlow - when the system signals a low battery condition
- @resume - when resuming from sleep or suspend
- @onac - when system switches to AC power
- @onbat - when system is switches to run on battery power
Environmental variables beginning with the tilde (~) character have special meaning:
- ~CWD - sets the current working directory for entries that follow the line on which the value is found. You may specify this multiple times in a crontab. The default value is undefined (processes inherit the working directory of the cron service).
- ~AC_ONLY - when set to the numeric value of "1", indicates the entries that follow will only run when the system is running on AC power (not batteries). If set to "0" instead, the tasks will run regardless of the power state. The default is "0".
Also note that when a job is run, the user's profile and registry hive are loaded, and the environment for the job is based on their configured environment settings before being modified by the crontab.
TODO
- ntcrontab -e syntax to edit a tab interactively
- ntcrontab -u syntax for administratoes to edit the tab for an specific user
- ntcrontab -s syntax to specify the machine on which the crontab is/will reside
- make @daily, @weekly, @monthly etc. behave like anacron.
- add generic output capture support and pipe it somewhere according to settings in the crontab.
