Contents | < Browse | Browse >

/// Introduction to DCron
    by Robert Niles

Something that would be nice to have is a program that automatically
maintains your system for you....well sort of anyways. This is especially
important and needed by those of you who run BBSes, but I'm sure there is
enough reason for everyone else out there to get a program that will help
keep your computer from becoming a mess.

One such program is DCron, a UNIX like CRON utility, by Matt Dillon.
It took me a long time before looking into this pretty little program,
mostly because of the description given in the documentation:

" Those not familar with the UNIX cron command probably do not need it. "

While it might be descriptive to most people, I was at a loss.

...until another set of documents showed me how useful it could be.

DCron is a program that allows you to execute other programs at any interval
you like. Monthly, hourly, by the minute, or on a specific day of the week.

As I run a BBS, there are call in which I would like to have my computer
make at strange hours, logs that need to be resized, deleted, or renamed.
Even have GPFax see if there is a fax to be sent out every hour. 

Using DCron makes this alot easier for those of us who do not want to get up
in the middle of the night to do these things.

DCron is set up as a 'grid' for example:

#<min> <hour> <day> <month> <dayofweek>	[<command>]
01	0	1	*	*	copy uuspool:xferstat uuspool:old
02	0,07,20	*	*	*	delete uunews:junk/#?
40	18-07	*	*	*	uucp:c/uucico -b -7 -r1
0	0	*	*	*	copy axsh:etc/passwd sys:t/
15	12	*	*	*	delete sys:t/cronlog
20	*	*	*	*	c:rx GPFax:Fax_Send.gpf
01      12	*	*	*	date >>axsh:etc/adm/answers

The '*' indicates "everytime". If it is under the "day" field, then that
command is executed every day.

Look at the first field. I have "01" under minute, "0" under hour, "1" under
day, and an asterisk under month and dayofweek. This copies the files
mentioned at 12:01am on the 1st day of each month.

The second field has "02" under minutes, "0,07,20" under the hour column, and
an asterisk under the rest. This deletes the files in the "junk" drawer every
day at 12:02am, 7:02am and at 8:02pm.

As you see, it's quite flexable, but remember, DCron can only start a
program, it cannot quit a program. That has to be done by the program that
was started, or you have to do it with an ARexx script, if you can.

DCron can be found in the AmigaUUCP archive, and there are other versions of
the unix Cron utility for the Amiga. Whichever you choose, it should make
some of your everyday work a little bit easier.