Where is the difference in Cron...

tdldp

Verified User
Joined
May 9, 2005
Messages
150
Hi all...

Problem of the day (existentialist you'll say)

When installing clamAV, i remember having had to :
editor=pico
crontab -e

and entered the cron jobs for this soft...

yet when editing /etc/crontab, the line concerning clamAV doesnt appear anywhere, and i cannot find it anywhere else than be typing crontab -e which points on a /tmp/crontab.xxxxxxxx

For my personnal culture, i'd like to understand difference between the etc/ crontab and the tmp/crontab...
Is the tmp/crontab necessary ??? or can i copy paste the data it contains ( 2 lines in fact :
0 5 * * * /usr/local/sysbk/sysbk -q
40 * * * * /usr/bin/freshclam --quiet) inside /etc/crontab

Thks for your help..

Tdldp
 
/etc/crontab should be used only for system-wide cronjobs; that is cronjobs that affect the entire system.

Cronjobs that affect only specific functions or users or files should be in the users cronfile, editible as you've noticed, by typing:

crontab -e username

I believe you wonder where those entries go...

On most servers they end up in:

/var/spool/cron/

Note that editing these files directly will NOT make them work; you must use the crontab command, which manages them properly.

Forget about those /tmp files; they're just used by the crontab command while manipulating the cronjobs.

Jeff
 
Back
Top