Cron JOBs Not running on a specific site

shanit

Well-Known Member
Dec 18, 2005
46
0
156
Hi I have searched this site and I am still searching but I have a complaining customer, this customer is the only one on the server whose cronjobs dont run I have searched the error logs and will post if requested BUT they dont have anything about cron job in them, can I look some where else specifically for errors for this one account??? all help is appreciated as I'm at a loss I have tried everything i have read as far as what was close to fixing the problem and nothing worked so far

Thanks
Shannon
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,980
156
368
SLC
cPanel Access Level
DataCenter Provider
i asume you are trying to run every ten minutes then below is the correct syntax
*/10 * * * * /usr/bin/lynx --dump http://www.XX.com/scripts/admin/cronjobs.php > /dev/null
did you check the cron logs to see if it is executing is crond running?
are you getting an error email ??

remove the "> /dev/null" and see the output email if all ok then the script iself is to blame not the cron
 

shanit

Well-Known Member
Dec 18, 2005
46
0
156
dalem said:
remove the "> /dev/null" and see the output email if all ok then the script iself is to blame not the cron
I have set it with out the > /dev/null we'll see what happens in about 15 minutes i'll give it.
is there a way to restart my cronjobs like i do all the other services

I know its not the scripts cause I have the same ones installed over like 8 other accounts on same vps, its just this one.

when i do crontab -e in ssh it only gives me one cron and dont list any crons that are set at all. Should it list all of the cronjobs that are running or setup to run.

Thanks again
Shannon
 

WebScHoLaR

Well-Known Member
Dec 14, 2005
510
3
168
Planet Earth
You can stop/start the crond daemon as :

service crond stop/start

All cron files are located at /var/spool/cron/ directory.Inside this directory you will find the files with the same name as of the account username.

You can check the cron jobs setup for a specific account by:

crontab -e -u username
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,980
156
368
SLC
cPanel Access Level
DataCenter Provider
service crond restart

if you are looged in via root it would be

crontab -u username -e
to edit users cron


crontab -e from root should look somthing like this

10 0 * * * /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
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
 

shanit

Well-Known Member
Dec 18, 2005
46
0
156
dalem said:
crontab -e from root should look somthing like this

10 0 * * * /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
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
this is what mine looks like when i run crontab -e
0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1


think i have a problem
 

shanit

Well-Known Member
Dec 18, 2005
46
0
156
dalem said:
you could run a

/scripts/upcp --force

and it might add everything back
some of them might be missing if your not running the services
ok that added this
0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
43 0 * * * /scripts/upcp
0 1 * * * /scripts/cpbackup
*/15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1


now i dont need to install nothing again like ioncube ornothing right? cause I'm not sure if this was like a rebuild or what :) but it added stuff back BUT the cron still wont run I dont get it

thanks
Shannon
 

shanit

Well-Known Member
Dec 18, 2005
46
0
156
dalem said:
what do your cron log say
Ok this is what is in the /usr/local/cpanel/logs/error_log
well that one is totally blank nothing there

and when I go this route to
/var/spool/cron/username the logs say this
MAILTO="username"
5 * * * * lynx --dump http://xx.com/scripts/admin/cronjobs.php > /dev/null
*/10 * * * * lynx --dump http://www.xx.com/scripts/admin/cronjobs.php

I set it up 2 different ways to see if i could get one to work one with out the > /dev/null and one with it.

if you know anywhere else for errors please let me know Thanks so much
Shannon
 

Izzee

Well-Known Member
Feb 6, 2004
469
0
166
The cron log is at:
/var/log/cron

I think you may have to put the path to lynx like you did in your first post.
*/10 * * * */usr/bin/lynx --dump http://www.XX.com/scripts/admin/cronjobs.php > /dev/null

Make sure the entry is in /var/spool/cron/username

If not then go through the motions in cPanel to add it which might be easier than using the command line edit.

You can, as admin, go to the users cpanel from within WHM by clicking on Account Information >> List Accounts then under column cPanel click on the logo icon. Then add the entry in the Cron Jobs either in the advanced mode or the Standard mode which ever you prefer.

Tip: If you are tab browsing then use another tab by right clicking the logo icon.

Make sure the cron daemon is running and there is not much else to it really.
# /etc/rc.d/init.d/crond status
crond (pid nnnn) is running...

or
crond is stopped

if stopped run
# /etc/rc.d/init.d/crond restart
Stopping crond: [ OK ]
Starting crond: [ OK ]


Either started or stopped you can run the restart command again just in case.

crond usage: /etc/rc.d/init.d/crond {start|stop|status|reload|restart|condrestart}

:)
 
Last edited: