[Tux Gif]
 Linux System Administration

CUPS and CRON


/etc/crontab
            [mlevan@localhost ~]$ more /etc/crontab
            SHELL=/bin/bash
            PATH=/sbin:/bin:/usr/sbin:/usr/bin
            MAILTO=root
            HOME=/

            # run-parts
            01 * * * * root run-parts /etc/cron.hourly
            02 4 * * * root run-parts /etc/cron.daily
            22 4 * * 0 root run-parts /etc/cron.weekly
            42 4 1 * * root run-parts /etc/cron.monthly



The first part is almost self explanatory; it sets the variables for cron.

SHELL is the 'shell' cron runs under. If unspecified, it will default to the entry in the /etc/passwd file.

PATH contains the directories which will be in the search path for cron e.g if you've got a program 'foo' in the directory /usr/cog/bin, it might be worth adding /usr/cog/bin to the path, as it will stop you having to use the full path to 'foo' every time you want to call it.

MAILTO is who gets mailed the output of each command. If a command cron is running has output (e.g. status reports, or errors), cron will email the output to whoever is specified in this variable. If no one if specified, then the output will be mailed to the owner of the process that produced the output.

HOME is the home directory that is used for cron. If unspecified, it will default to the entry in the /etc/passwd file
.



Prev                Page 3                Next