Default Cron Setup

guru_ck

New Member
Hey Guys,

I was trying to add an entry in cron to restart httpd every 12 hours but apparently I don't fully understand it yet. I'm afraid I might have screwed something up and I know CPanel has allot of entries in there so can you compare yours to mine and let me know what needs to be changed?

/etc
-cron.d
--EMPTY DIR
-cron.daily
--00-makewhatis.cron
--rpm
--tetex.cron*
--yum.cron*
--logrotate*
--slocate.cron
--tmpwatch
-cron.deny
nobody
-cron.hourly
--EMPTY DIR
-cron.monthly
--EMPTY DIR
-cron.weekly
--00-makewhatis.cron
--yum.cron*
-crontab
40 5 * * * /scripts/upcp
0 1 * * * /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
0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
1 0 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
*/1 * * * * /sbin/service httpd restart
 
I'm definitely not an expert but it looks to me like vi crontab breaks the crontab into scheduled events whereas crontab -e is directly editing the crontab.

This " */1 * * * * /sbin/service httpd restart" means you are restarting httpd once every minute...

I would think that doing a crontab -e and then adding a line similar to "30 3 * * * /sbin/service httpd restart" which would restart httpd once every day at 3:30am would do the trick for you.
 
/etc/crontab is a system cron configuration file - you can execute any tasks under any specified user permissions. "crontab -e [-u user]" allows you to edit per-user crontab located in the /var/spool/cron/ directory.
 
Top