elis2

Active Member
Aug 14, 2017
29
1
3
Iran
cPanel Access Level
Root Administrator
hi


nano /etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed





cron jobs not running,plz hellp me

thank you
Best Regards
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
458
113
UK
cPanel Access Level
Root Administrator
You have not told us which users cron is not running, so here is some general information:

System and root cron jobs can be found in /var/spool/cron/root
User cron files are in /var/spool/cron/username


Common commands for manipulating cron:

"crond start" (Starts the cron daemon)
"crond stop" (stops the cron daemon)
"ps aux | grep crond" (check to see if cron daemon is running)
"crontab -l" (list all cronjobs set by root user)
"crontab -u username -l" (lists all cronjobs set by username)
"crontab -e" (edit a cronjob for root user)
"crontab -u username -e" (edit a cronjob for username)
"crontab -r" (remove all cronjobs of root user)
"crontab -u username -r" (remove all cronjobs of username)

Hope this helps
 
  • Like
Reactions: elis2

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Can you please provide the output of the below command

crontab -l -u username

And you can check the logs as well

and provide us the recent logs

[email protected] [/var/log]# cat cron | grep username
 
  • Like
Reactions: elis2

elis2

Active Member
Aug 14, 2017
29
1
3
Iran
cPanel Access Level
Root Administrator
Can you please provide the output of the below command

crontab -l -u username

And you can check the logs as well

and provide us the recent logs

[email protected] [/var/log]# cat cron | grep username
Daar thank you for answer.

According to user cron job connect,and disconnect At some hours.
Code:
[[email protected] ~]# crontab -l -u user
MAILTO="[email protected]"
SHELL="/usr/local/cpanel/bin/jailshell"
*/5 * * * * /usr/bin/php -q /home/user/public_html/folder/file.php >/dev/null
2 8 * * * /usr/bin/php -q /home/user/public_html/folder/file.php
*/10 * * * * /usr/bin/php -q /home/user/public_html/video/file1.php >/dev/null
*/12 * * * * /usr/bin/php -q /home/user/public_html/video/file2.php >/dev/null
50 7 * * * /usr/bin/php -q /home/user/public_html/folder/file.php
[[email protected] ~]#



Nov 25 08:10:01 server CROND[1145]: (user) CMD (/usr/bin/php -q /home/user/public_html/video/file.php >/dev/null)
Nov 25 08:10:01 server CROND[1200]: (user) CMD (/usr/bin/php -q /home/user/public_html/folder/file.php >/dev/null)
Nov 25 08:12:01 server CROND[3341]: (user) CMD (/usr/bin/php -q /home/user/public_html/video/file.php >/dev/null)
Nov 25 08:12:18 server crontab[3664]: (user) LIST (user)
Nov 25 08:12:19 server crontab[3676]: (user) LIST (user)
Nov 25 08:12:50 server crontab[3999]: (user) LIST (user)
Nov 25 08:12:50 server crontab[4000]: (user) REPLACE (user)
Nov 25 08:12:58 server crontab[4046]: (user) LIST (user)
Nov 25 08:12:58 server crontab[4047]: (user) REPLACE (user)
Nov 25 08:13:01 server crond[16797]: (user) RELOAD (/var/spool/cron/user)
Nov 25 08:13:07 server crontab[4357]: (user) LIST (user)
Nov 25 08:13:07 server crontab[4358]: (user) REPLACE (user)
Nov 25 08:13:16 server crontab[4414]: (user) LIST (user)
Nov 25 08:13:16 server crontab[4415]: (user) REPLACE (user)
Nov 25 08:13:47 server crontab[4576]: (user) LIST (user)
Nov 25 08:13:47 server crontab[4577]: (user) REPLACE (user)
Nov 25 08:14:01 server crond[16797]: (user) RELOAD (/var/spool/cron/user)
Nov 25 08:15:01 server CROND[5414]: (user) CMD (/usr/bin/php -q /home/user/public_html/folder/file.php >/dev/null)
Nov 25 08:20:01 server CROND[9158]: (user) CMD (/usr/bin/php -q /home/user/public_html/video/file.php >/dev/null)


me check log cron croon some time connect and disconnect.

thnk you
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello,

Can you provide more details about what in-particular is not working, or which particular cron job is not running?

Thank you.