Instructions
A good introductory article about pycron can be found at http://www.bigbluehost.com/article4.htmlpycron is a cron service written in Python converted to an executable with py2exe. It's a successor to cron with a couple of changes and extensions:
New in version 0.5:
Download
Please follow the link to download the Setup program.
| Version: | Download link: |
|---|---|
| pycron Version 0.5.9 | http://www.kalab.com/freeware/pycron/pycron-0.5.9.0.exe (3.08MB) |
| pycron Version 0.5.9 64-bit | http://www.kalab.com/freeware/pycron/pycron-a64-0.5.9.1.exe (4.27MB) |
Setup as a service
The crontab.txt file
Each line of CRONTAB.TXT has the following structure:
<Minute> <Hour> <Day> <Month> <Day of Week> <Command line>
| Position: | Values: |
|---|---|
| Minute | 0-59 |
| Hour | 0-23 |
| Day | 1-31 |
| Month | 1-12 or use names |
| Day of week | 0-6 (0=Sunday, 1=Monday, ..., 6=Saturday) or use names |
Instead of minute, hour, day, month or day of week it's also possible to specify a *. A * represents all possible values for that position (e.g. a * on 2nd position is the same as specifying all the possible values for hour)
Several values can be separated by commas: e.g. if a command is to be executed every 10th minute so you can specify 0,10,20,30,40,50 for minute. A range of values can be specified with a -: e.g. value 0-12 for hour -> every hour a.m.
A divider is specified by "/": */2 specified for minute means every second minute. 5-10/2 for hour matches every second hour from 5 to 10.
Line continuation character: " \". Please note: there has to be a space before "\". There's no character allowed after "\".
Comments
Every line starting with a "#" is treated as a comment.
character '?'
... means "time of pycron startup". Internally all the ? get replaced by the current time. So if you specify e.g.
? ? * * * command
The command gets executed on startup of the pycron service and then every day at the same time (if the computer is not turned off in between). If the cron service was started e.g. at 10:29 the command gets executed at 10:29 and at 10:29 the following days.
Examples
See the included file crontab.txt.sample for examples.
Crontab Editor
Included is an editor for crontab.txt files. Click on the screenshot to view a larger image.