Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
# m h dom mon dow command
25 0 5 * * root php -f /var/www/optimum/check_macs.php
I want it to run every 5th day of the month at 12:25am. I ran a test changing the system's time and setting it to about 5 minutes prior but, when it comes time, the script doesnt run.
I edited the crontab by issuing crontab -e as root and it generated a crontab for root.
I almost forgot to mention that, when I run the script from the command line: php -f /var/www/optimum/check_macs.php it works.
Does anyone have an idea of why the script is not running?
Thanks in advanced.
Last edited by landysaccount; 02-04-2009 at 04:07 PM.
One fairly common problem with cron jobs is that cron has a fairly skimpy PATH. The php compiler may not be on your cron's PATH. Try giving the full path to the php command in your cron statement.
Tried that and still not working... The script is not running but, I noticed something in the /var/log/auth.log file:
Feb 5 00:09:01 debian CRON[2256]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 00:09:01 debian CRON[2256]: pam_unix(cron:session): session closed for user root
Feb 5 00:20:01 debian CRON[2303]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 00:20:01 debian CRON[2303]: pam_unix(cron:session): session closed for user root
Feb 5 00:25:01 debian CRON[2357]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 00:25:02 debian CRON[2357]: pam_unix(cron:session): session closed for user root
Feb 5 00:39:01 debian CRON[2376]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 00:39:01 debian CRON[2376]: pam_unix(cron:session): session closed for user root
Feb 5 00:40:01 debian CRON[2386]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 00:40:01 debian CRON[2386]: pam_unix(cron:session): session closed for user root
Feb 5 00:59:01 debian CRON[2404]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 00:59:01 debian CRON[2404]: pam_unix(cron:session): session closed for user root
Feb 5 01:05:01 debian CRON[2417]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 01:05:01 debian CRON[2417]: pam_unix(cron:session): session closed for user root
Feb 5 01:09:01 debian CRON[2426]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 01:09:01 debian CRON[2426]: pam_unix(cron:session): session closed for user root
Feb 5 01:17:01 debian CRON[2436]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 01:17:01 debian CRON[2436]: pam_unix(cron:session): session closed for user root
Feb 5 01:39:01 debian CRON[2462]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 01:39:01 debian CRON[2462]: pam_unix(cron:session): session closed for user root
Feb 5 01:40:01 debian CRON[2476]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 5 01:40:01 debian CRON[2476]: pam_unix(cron:session): session closed for user root
That looks like is trying to do something with cron but some how my script doesn't run.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.