UTERMINAL
TERMINAL
NEXT
$V1$
NEXT3
$PROMPT$
PAUSE
PAGETURNER
ENCORE5
ENCORE
BOX
FILE
GO
crontab
SYNTAX
/usr/lib/crontab
FUNCTION
The crontab file holds the schedule of processes
to be spawned/executed by the clock daemon cron.
The file /usr/lib/crontab consists of entries
of six fields each. Remember that the fields are
separated by spaces or tabs. The first five
fields are integers, the last one is the
process name.
The fields and the ranges of their values are:
minute hour day month day_of_the_week process
0-59 0-23 1-31 1-12 0-6, Sunday=0 (name)
Let us look at some typical /usr/lib/crontab entries.
0,10,20,30,40,50 * * * * /usr/lib/atrun
20 1 * * * /usr/bin/calendar -
45 16 * * * 5 /usr/weekend/wish
0 9 10 8 * /urgent/vacation
0,10,20,30,40,50 * * * * /usr/lib/atrun
The entry 0,10,20,30,40,50 * * * * /usr/lib/atrun says that
every ten minutes the process /usr/lib/atrun, should be run!
0,10,20,30,40,50 * * * * /usr/lib/atrun
20 1 * * * /usr/bin/calendar -
The entry 20 1 * * * /usr/bin/calendar - says that at 1:20 AM,
every day the process calendar is to be run!
0,10,20,30,40,50 * * * * /usr/lib/atrun
20 1 * * * /usr/bin/calendar -
45 16 * * * 5 /usr/weekend/wish
The entry 45 16 * * 5 /usr/weekend/wish says that every Friday at 4:45 PM
the program /usr/weekend/wish is to be run.
0,10,20,30,40,50 * * * * /usr/lib/atrun
20 1 * * * /usr/bin/calendar -
45 16 * * * 5 /usr/weekend/wish
0 9 10 8 * /urgent/vacation
The entry 0 9 10 8 * /urgent/vacation says that every year at 9:00 AM
on August 10 the program /urgent/vacation is to be run!
Now, that you have an idea of how to construct a /usr/lib/crontab
entry, let's write an entry to charge users for computing time
by running /chore/backup at midnight every day.
(Use space between entries)
:
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Remember, the fields are:
minute hour day month day_of_the_week process
0-59 0-23 1-31 1-12 0-6, Sunday=0 (name)
Think about the ranges of field values!
minute hour day month day_of_the_week process
0-59 0-23 1-31 1-12 0-6, Sunday=0 (name)
I will help you this time.
FORGET1
0 0 * * * /chore/backup
Observe the result on the terminal!
$PROMPT$