Incode Systems Home Page Incode Systems, Inc.


CRON



(08-14-1997 9:41am CRON.EXE)
CRON - (C) Copyright Glenn B. Lawler, 1992. All Rights Reserved.

Usage: [EXITDELAY] [FileCheckDelay]
CRON runs recurring programs at times specified in the file
CRONTAB located in the current directory, and one-time
programs in batch files in the current directory which have
names corresponding to the time they are to be run in the form:
YYMMDDHH.MMn where: YY is the year, MM is the month, DD is the
day, HH is the hour (24 hour time), MM is the minute, and n is
a number 0-9 for up to 10 files with the same execution time.

The program AT may be used to generate these one-time files.
The optional EXITDELAY parameter may be used to specify a number
of minutes after which CRON will exit. Default or _ is no exit.
FileCheckDelay may be used to specify additional minutes to wait
before checking for AT files and changes to CRONTAB.

CRON may be exited manually by pressing any key followed by Esc.
CRON sets ERRORLEVEL 1 when exited manually, and ERRORLEVEL 2
when a fatal error has been encountered.

Press any key to continue ...

CRON is intended to be run from within the following CRONEXEC.BAT:

:BEGIN
CRON 10
IF ERRORLEVEL 2 GOTO ERROR
IF ERRORLEVEL 1 GOTO QUIT
IF NOT EXIST $CRONRUN.BAT GOTO POLL
CALL $CRONRUN
DEL $CRONRUN.BAT
GOTO BEGIN
:POLL
REM Add lines here for execution when CRON exits after 10 minutes
GOTO BEGIN

:ERROR
ECHO CRONEXEC: Fatal Error. Exiting.
GOTO END

:QUIT
ECHO CRONEXEC: Operator abort. Exiting.

:END
Press any key to continue ...

CRONTAB contains six fields on each line separated by spaces or tabs. The
first five fields are integer patterns specifying the minute (0-59), hour
(0-23), day of the month (1-31), month of the year (1-12), and day of the
week (1-7 with 1=monday). Each pattern may contain a single number, a
range of numbers (ex: 0-12), a set of numbers (ex: 1,2,3), or an asterix
for all legal numbers.
If the 1st parameter is preceeded by !, line is skipped during catch up.

The sixth field is the command to be executed. Multiple command lines
may be specified by separating them with ~.
Example:
is a comment
25 22 * * * ECHO Event 1~ECHO Command line 1~ECHO Command line 2
0 6 * * 1-3,5 ECHO Event 2~ECHO Command line 1~ECHO Command line 2
!* * * * 1 ECHO Event 3~ECHO Command line 1~ECHO Command line 2

The first CRONTAB event above will run every day at 22:25 (10:25pm)
The second event will run mon, tue, wed, and fri at 06:00 (06:00am)
The third event will every minute on mondays, but not during catch up mode.
Comments may be included by surrounding them with and