Dec 292017
CRONTAB is a program that will run programs based on the date.
File CRONTB.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
CRONTAB is a program that will run programs based on the date.
File Name File Size Zip Size Zip Type
CRONTAB.DAT 4583 1232 deflated
CRONTAB.DOC 13942 4634 deflated
CRONTAB.EXE 34608 18522 deflated

Download File CRONTB.ZIP Here

Contents of the CRONTAB.DOC file


Copyright 1990-1991, Thomas G. Harold, All Rights Reserved.

CRONTAB is a program that will run programs based on the
date. Execution can be periodic such as daily, weekly, monthly,
or yearly with or without a specified offset such as the third
day of the month. Execution can also be day-specific such as
every Monday, Wednesday, Friday, or on the 15th of each month.
If it has to be done periodically, then CRONTAB is the program to
do it.



Installation of CRONTAB is fairly simple. CRONTAB.EXE should
be placed into a directory in your path (such as C:\BIN), and
CRONTAB.DAT should be placed into any convenient directory (e.g.
C:\BIN\CRONTAB). After installing these two files, see the
USAGE NOTES section for information on configuring CRONTAB for
your system.

CRONTAB uses two data files. CRONTAB.DAT is the main data
file and contains a list of things for CRONTAB to do. The second
file, CRONTAB.REC, is created and maintained by CRONTAB and
should not be tampered with unless you want CRONTAB to forget
what it was doing. CRONTAB assumes that it will find these two
files in the directory where it is started from, and will not
look anywhere else.

The basic operation of CRONTAB is quite simple. To operate,
you must change directories so that your current directory is the
directory containing CRONTAB.DAT. Then, to start CRONTAB, just
issue the command CRONTAB and press enter. CRONTAB will look for
and read CRONTAB.REC if it exists, otherwise it will create it,
then CRONTAB will proceed to process the CRONTAB.DAT file. After
CRONTAB is finished, it will update its CRONTAB.REC file and

CRONTAB can also be run in quiet mode. This is accomplished
by using "CRONTAB -Q" when running CRONTAB.




The data file, CRONTAB.DAT, is the file that directs CRONTAB.
It consists of codes and command-lines that will tell CRONTAB
when and which programs to execute. Each line in the file is
made up of a three letter code optionally followed by a sub-code
and arguments, and a command-line which is set off by a comma.
For example:


"XXX" is the three letter code which defines the basic
command class. Codes are not case-sensitive. Currently this
code can be one of the following classes:

AWS "Always"
PER "Periodic"
DOP "Day-Of-Period"

"Y" is the optional one letter code which defines the sub-
class for a command. Currently this code can be one of the

D "Daily"
W "Weekly"
M "Monthly"
Y "Yearly"

"NN NN NN" is the optional argument list for the command.
This is described in more detail later.
Finally, "C:\DOS\CHKDSK /F" is the command-line to be
executed. Notice that it is separated from the command codes by
a comma.
Comments can be placed in the data file by using a semicolon
at the start of any line. This provides a quick way of disabling
parts of the data file from being executed.


The "AWS" code is short for "Always". This code has no sub-
codes or arguments and indicates that CRONTAB should always
execute its command-line.


The "PER" code is short for "Periodic" and indicates that
this command-line is to be executed on a periodic time interval.
"Periodic" codes are executed once per day at the most, and are
only executed once during their specified period. The difference
between "Periodic" codes and "Day-Of-Period" codes is that if
CRONTAB is not executed on the day that the period starts, then
the command will be executed the next time that CRONTAB is run.
For example, if the periodic code indicates that a backup should
be done on or after the 15th of the month and CRONTAB is not run
on the 15th, 16th or 17th of the month, then when CRONTAB is run
on the 18th, the backup will get done at that time. But if
CRONTAB was run as planned on the 15th, then the backup would get
done on the 15th as planned.
There are four sub-codes used by "PER" codes. They are the
"D" (Daily), "W" (Weekly, "M" (Monthly), and the "Y" (Yearly)
codes. "PERD" (Periodic-Daily) codes get executed once per day,
every day of the year. "PERW" codes get executed once per week.
"PERM" codes get executed once per month. And "PERY" codes get
executed once per year.

"PERD" codes take no arguments and simply indicate that the
command-line is to be executed once per day, every day of the

"PERW" codes take the form "PERWn", where "n" is the day of
the week to base the period on. Sunday = 0, Monday = 1, and so
on through Saturday = 6. If "n" is not given, then CRONTAB will
assume that Sunday was meant.

"PERM" codes take the form "PERMnn", where "nn" is the day of
the month to base the period on. For example, if the backup is
to be done on or after the 20th of the month, the code would be
"PERM20". If the code indicates a day that is too high for the
current month, (e.g. 30 in February), the code will be executed
on the last day of the month. (In February of a non-leap year,
all PERM29, PERM30, & PERM31 codes would be executed on the same
day as the PERM28 code.) If "nn" is not given, CRONTAB will
assume that the first of the month is meant.

"PERY" codes take the form "PERYn/nn", where "n/nn" is the
month/day of the year to base the code on. If "n/nn" is not
given, then CRONTAB will assume that the first of January was
meant. "PERY" codes could possibly be used in a group to execute
a file every three months. This would be accomplished by the
following which would call TRIMONTH.BAT. (This technique could
also be used with PERM & PERW codes.):

; Example of a batch file which is to be called every 3 months.


The "DOP" code is a mnemonic for "Day-Of-Period" and tells
CRONTAB that this command-line is to be executed on certain days
in a given time interval. "Day-Of-Period" codes, like "PER"
codes, are only executed once on the day specified. "DOP" codes
could be used to run programs on a Monday, Wednesday, Friday
schedule, on the 1st, 3rd, and 10th of each month, or any other
way that you need.
There are three sub-codes used by "DOP" codes. They are the
"W" (Weekly), "M" (Monthly), and the "Y" (Yearly) codes. "DOPW"
(Day-Of-Period-Weekly) codes get executed on certain days of the
week. "DOPM" codes are executed on certain days of the month.
And "DOPY" codes can be executed on a certain day of the year.
(Such as the day before your friend's birthday, to remind you to
get a card and present.) All "DOP" codes require one or more
arguments to function correctly.

"DOPW" codes take the format "DOPWnnnn", where "nnnn" is one
or more days of the week that the command should be executed on.
This consists of numbers between 0 (Sunday) and 6 (Saturday) and
can contain any combination thereof. (e.g. "135" for Monday,
Wednesday, and Friday.)

"DOPM" codes take the form "DOPMnn nn nn nn...", where "nn nn
nn..." consists of one or more days of the month to execute on.
For example, a code of "DOPM15 30" would execute on the 15th and
30th of the month. If a month is shorter than a given argument,
(e.g. "30" in February), then the command will execute on the
last possible day of the month. On February 28th of a non-leap
year, the codes "DOPM28", "DOPM29", "DOPM30" and "DOPM31" would
all execute on the same day.

"DOPY" codes take the form "DOPYm/dd" where "m" is the month,
and "dd" is the day of the month. "DOPY" codes handle February
29th differently then "DOPM" codes. If you specify "DOPY2/29" to
be executed, it will not be executed except on February 29th of
a leap year.


; Sample CRONTAB.DAT file
; (Extracted from the CRONTAB.DAT that comes with CRONTAB)
; Note that capitalization of the codes does not make a
; difference. Nor does spacing. Both are merely used for
; clarity and ease of understanding.
AWS ,echo Hello world, I am always executed

PErD ,echo This is a daily comment!
Perw,echo You'll see me at the start of each week!
PERW0 ,echo I'm weekly starting Sunday...
PERW1 ,echo I'm weekly starting Monday...
pERW2 ,echo I'm weekly starting Tuesday...
PERW3 ,echo I'm weekly starting Wednesday...
perw4 ,echo I'm weekly starting Thursday...
PErw5 ,echo I'm weekly starting Friday...
perw6 ,echo I'm weekly starting Saturday...

PERM ,echo Default monthly.
PERM5 ,echo This is on or after the 5th, isn't it?
PeRM20 ,echo It is now past the twentieth of the month. Time to pay bills!

PERY ,echo I do things at the beginning of the year.
PERY3/30 ,echo I make sure that you remember that March 30th has passed.
PERY12/31 ,echo Another year down the drain...

PERY01/01 ,echo This is the 1st of 4 executions per year.
PERY04/01 ,echo This is the 2nd of 4 executions per year.
PERY07/01 ,echo This is the 3rd of 4 executions per year.
PERY10/01 ,echo This is the 4th of 4 executions per year.

DOPW2 ,echo Today is Tuesday
DOPW3 ,echo Today is Wednesday
DOPW0 ,echo Today is Sunday
DOPW1 ,echo Today is Monday
DOPW4 ,echo Today is Thursday
DOPW6 ,echo Today is Saturday
DOPW5 ,echo Today is Friday
DOPW135 ,echo Today is either Monday, Wednesday, or Friday
DOPW0246 ,echo Today is either Sunday, Tuesday, Thursday, or Saturday

DOPM1 ,echo Today is the 1st of the month
DOPM1 5 10 ,echo Today is either the 1st, 5th, or 10th of the month.
DOPM20 31 ,echo Today is either the 20th or the last day of the month.
DOPM29 ,echo Today is the 29th (or last day if it's February).
DOPm28 ,echo Today is the 28th.
dopm30 ,echo Today is the 30th, (or the last day if it's February).
DopM31 ,echo Today is the last day in the month.

DOPY1/1 ,echo Happy new year!
dopY3/30 ,echo Today is March 30th!
DoPY12/25 ,echo Merry Christmas!

; **************************
; * End of sample file *
; **************************



Please let me know if you have any suggestions for CRONTAB.
If you have any questions that aren't answered in the
documentation file or sample CRONTAB.DAT file, than drop me a
note via U.S. Mail or Compuserve MAIL.



1.0 Fall 1989
Original release version that never really got

2.0 December 1990
Newer, better, faster version. Now it doesn't look
like a snail crawling across a runway.

2.1 January 1991
Fixed bug with PERY & DOPY codes.

2.2 July 1991
Added 'quiet' switch ("CRONTAB -Q")


Usage of CRONTAB is free to individuals using it for
personal/private use. In vogue with the current trend I ask that
if you really feel the need to send money to someone then make a
donation to charity. Educational institutions are also granted
free usage. I do ask that if CRONTAB is to be used by an
educational institution that I be notified for informational
purposes. Use in a business environment requires a site licence.
(Contact me for information on site licensing.)

This program is distributed "as is". I disclaim all
warranties, expressed or implied, including, without
limitation, the warranties of merchantability and of
fitness for any purpose. I will assume no liability for
damages, direct or consequential, which may result from
the use of this program.

Feel free to distribute this program so long as no money
changes hands except for media/connect-time costs. Once again, I
ask that if this program is distributed by any mail-order
distribution company that I be notified.
Modifications may not be made to CRONTAB except for
personal/private use. Modified copies may not be distributed in
any form.


Please contact me if you have any suggestions or questions about
the program. I can be reached at the following address:

Thomas G. Harold
2206 Tracey's Rd.
Sparks, MD. 21152

Or by using Compuserve MAIL:

Thomas G. Harold - 71750,3724

Please place the word "CRONTAB" where I can easily see it,
(e.g. in the subject field, or on the address label). This will
help me to more easily attend to your correspondence.

 December 29, 2017  Add comments

Leave a Reply