source: other-projects/trunk/winbin/bin/cron/readme.txt@ 17524

Last change on this file since 17524 was 16205, checked in by osborn, 16 years ago

Cron schedule program for Windows, needed for GLI Scheduling component

File size: 3.6 KB
Line 
1#
2# Python Cron
3# by Emilio Schapira
4# Copyright (C) 2003 Advanced Interface Technologies, Inc.
5# http://www.advancedinterfaces.com
6# http://sourceforge.net/projects/pycron/
7#
8
9**
10** INTRODUCTION
11**
12
13This is a clone of the well-known cron job scheduler for the unix flavored
14operating systems. It is implemented in Python. The main motivation for the
15project is to provide a robust cron daemon for the Microsoft Windows*
16operating system. However, Python Cron is platform-independant, and can
17be used on any operating system that supports python.
18
19CygWin (http://www.cygwin.com/) provides a robust implementation of the cron
20daemon, however it requires installing the full cygwin package. There are
21currently other alternatives that are either not robust, not free or not
22open source. Examples of these alternatives are WinCron
23(http://www.wincron.co.uk/), Cron (http://www.kalab.com/freeware/cron/cron.htm).
24
25This implementation is very simple, complete and robust.
26
27**
28** USAGE
29**
30
31usage: cron [crontab_file_name [log_file_name [pid_file_name]]]
32
33 crontab_file_name Name and location of the crontab file. By
34 default it is ./crontab
35 log_file_name Name and location of the log file. By default
36 it is ./cron.log
37 pid_file_name Name and location of the pid file. This file
38 will contain the process id of the cron
39 process. It can be used later to stop the cron
40 file. By default it is ./cron.pid
41
42**
43** Crontab files
44**
45
46A contrab file contains one command per line, except empty lines and
47lines starting with the character #, which are considered as comments.
48This file will be scanned every minute when cron is running.
49
50Each command has the format:
51
52<minute> <hour> <day of month> <month> <day of week> <command> <args>
53
54Cron will scan each entry and match the first five values with the
55current local time and date. The entries for each of these values must
56be either:
57
58 - A number. For <month> it is the month number, and for <day of week>
59 is the day number starting with Sunday=0.
60 - An asterisk (*) which indicates that any value matches this field.
61 - Comma separated numbers that indicate that each of the values can
62 match this field.
63
64The 6th argument, <command>, is the name of the program to run. The remaining
65arguments are passed to the programm <command> as command-line arguments.
66
67Example cron entries
68
690 * * * * echo "run every hour"
70
710 3 * * * echo "run every day at 3am"
72
7330,0 * * * * echo "run every half hour"
74
7545 15 * * 1 echo "run every monday at 3:45pm"
76
770 4 15 * * echo "run on the 15th of every month at 4am"
78
79**
80** Windows
81**
82
83This example is for Windows 2K.
84
851.- Unzip the package in c:\Program Files\pycron.
86
872.- You can create a shorcut in the startup folder, with
88 the following properties:
89
90 Target = C:\Program Files\Python22\pythonw.exe C:\Program Files\pycron\cron.py
91 Start In = C:\Program Files\pycron
92
93You will notice that console processes are launched in a new console window.
94To avoid this, use the provided program silentstart in your crontab file. For
95example:
96
97# Run backup script every morning at 3am
980 3 * * * silentstart c:\scripts\backup.bat
99
100silentstart.exe must be in the path. You can copy it to c:\winnt\system32.
101
102**
103** Limitations
104**
105
106- Crontab files can not have environment variable definitions.
107- pycron doeas not support the expresions of the form /2, month
108 or day of the week names, or dash expresions such as 5-9.
109
Note: See TracBrowser for help on using the repository browser.