Different Crontab? “crontab-and” and “/ etc/crontab”

Divino

Member
Jan 6, 2006
19
0
151
Hello friends!
Does anybody know how to explain the difference among those crontab?
Them healthy very different, besides in the form of editing, see:

“crontab -e” and “/ etc/crontab”

crontab-and
0 5 * * * / scripts/upcp
0 4 * * * / scripts/cpbackup
* /15 * * * * / usr/local/cpanel/whostmgr/bin/dnsqueue> / dev/null 2>&1
2,58 * * * * / usr/local/bandmin/bandmin
0 0 * * * / usr/local/bandmin/ipaddrmap
10 3 * * * / usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl--notify
0 6 * * * / scripts/exim_tidydb> / dev/null 2>&1
* /5 * * * * / usr/local/cpanel/bin/dcpumon> / dev/null 2>&1

/ etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME = /

#run-parts
10 4 * * * root run-parts / etc/cron.hourly
01 4 * * * root run-parts / etc/cron.daily
30 4 * * 0 root run-parts / etc/cron.weekly
35 3 1 * * root run-parts / etc/cron.monthly
10 4 * * * root rm - fR / tmp / *
* /5 * * * * root / usr/local/sim/sim - q >> / dev/null 2>&1


Thanks
 

kev1nk

Member
Sep 11, 2007
11
0
51
RE: crond

The "cron jobs" are controlled by the crond daemon. As you can see in your etc there are many "cron*" folders. There is another very important folder also "/var/spool/cron/".
The "/etc/crontab" file could be describe as configuration file. It is used for your regular daily, weekly and monthly tasks. The entries there are not just simple scripts but "run-parts" tasks.
The "crontab -e" function is opening your "/var/spool/cron/$user" where "$user" is the username you are currenly using. If you are logged as "admin" then "crontab -e" will open "/var/spool/cron/admin", but "cat /etc/crontab" will return the same.
The tasks in "/var/spool/cron/" will be run as the user specified there. The tasks in "admin" will be started as "admin". The entries specified in "/etc/crontab" will be started as root user(he is owner of the crond process).

Best Regards
Kevin K