Contents of the DATECHEK.DOC file
DATECHEK DOCUMENTATION v1.1
by David Wesson 24 Fairview St. W. Hartford, CT 06119 203-523-1873
DATECHEK checks the current date to perform periodic operations.
If the date criteria is met, a command string is activated, and
a message with a time and date stamp is written to a file called
DATECHEK.LOG for reference. In all cases, an errorlevel is set.
SYNTAX: DATECHEK period commandstring ! period commandstring . . .
period = EVERY, DAILY, MON, TUE, WED, THU,
FRI, SAT, SUN, FIRST, LAST, MID
commandstring = command to be executed (no quotes)
! = delimiter for multiple operations (10 max)
PERIOD DESIGNATIONS EXIT ERRORLEVELS
EVERY = Every Log On (For last operation only)
DAILY = Each Day, first Log On only 0 = Date matched
MON, TUE, WED, THU, FRI, SAT, SUN 1 = Date not matched
= Every Monday, Tuesday, etc. 2 = No commandline
FIRST, MID, LAST 3 = Commandline error
= Every First, Fifteenth,
or Last Day of the month
SYNONYMS and ABBREVIATIONS
The program assumes you are not likely to read the docs frequently,
thus has been designed to take logical synonyms for the period words.
To wit: EACH = ALL = EVERY DAY = DAILY MIDDLE = MID
Full weekday names will be read as their abbreviations. In fact, only
the first two characters are necessary. Abbreviations are best if you
are trying to pack a mess of operations on one command line. Also,
long command strings are accepted, including spaces, but it would be best
to call a batch file if you want to execute multiple line commands.
This program creates a very small DATEFILE to preserve the date it was
last run. This file is made when the program terminates. Thus the program
can only be run once a day. This is not a serious problem, since you can
run up to 10 operations from one evocation of DATECHEK using ! to delimit
the operations. You may not be able to get 10 operations on one DOS command
line, but the capacity is there.
This program runs your operations from within a shell, which means that it
should not be used to run large, complex programs, just routine DOS functions
or backup-type procedures. Also, if the program you call does not terminate
gracefully, it may not permit reentry into DATECHEK to complete multiple
command operations. You will only learn this by trial and error, but this
should not prove to be a critical problem most of the time.
Nevertheless, the author accepts no liability for screw-ups.