cron jobs not running
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
-
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 0 -
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 root@web [/var/log]# cat cron | grep username 0 -
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 root@web [/var/log]# cat cron | grep username
Daar thank you for answer. According to user cron job connect,and disconnect At some hours.[root@server ~]# crontab -l -u user MAILTO="user@yahoo.com" 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 [root@server ~]# 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 you0 -
Hello, Can you provide more details about what in-particular is not working, or which particular cron job is not running? Thank you. 0
Please sign in to leave a comment.
Comments
4 comments