Comprehensive System Administration
Lecture 3 notes:
administrivia:
Getting Help
If you have trouble, please email me, or one of the other teachers.
The OCF staffers are often around the lab, and can be helpful.
Don't forget your classmates can also be helpful.
class notes:
/etc
blah,blah,blah...
Cron Jobs
The cron daemon is a process that executes prescheduled tasks on an automated basis.
cron is typically used to run automated backups, do system accounting, clean up
temporary files, distribut data to remote computers, remind people about
important dates, and anything that needs to be done on a routine basis.
There are several different versions of cron, and unfortunately the OCF
doesn't allow general-user access to cron. Access to cron is controlled
with the /etc/cron.d/cron.allow and /etc/cron.d/cron.deny
files.
A brief introduction nonetheless:
on AT&T style systems, a user submits a file (called a crontab) by:
crontab mycrontab
if the user already has a crontab, she can retrieve it with:
crontab -l > mycrontab
The crontab file contains entries in the following format:
minute hour day month weekday command
with the ranges: 0-59 0-23 1-31 1-12 1-7
the command is a command or script recognizable by sh.
Examples (from the crontab manpage): Mail a birthday greeting:
(at noon, on Feb. 14th)
0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.
0 0 * * 1 command
(would run a command only on Mondays.)
enrichment
Check out the manpages for cron, crontab, init, telinit, inetd, inetd.conf.
Look at the /etc/rc2.d/README and read some of the scripts in
the /etc/rc folders to get a feeling for sh-style shell
scripting.
On different systems you may have access to, check out which daemons
are running using the ps command.