seventheyejosh Posted August 9, 2010 Share Posted August 9, 2010 Hi! My cron is giving me a headache. I first started by doing a simple cron. * * * * * /usr/bin/php /var/cron.php If I run it manually, it works great. It doesn't seem to be running. I made another one, this time, mycron.php, which merely echos 'made it: date'. I edited /etc/crontab to set MAILTO = root, which is who I'm logged in as, and set my email as the work and home email of root, but I've gotten no mail. So I found a test one online that is merely * * * * * root echo 'here' This does nothing. I'm entering my cron with 'crontab -e' and it seems to be syntactically correct: * * * * * /usr/bin/php /var/cron.php * * * * * /usr/bin/php /var/mycron.php * * * * * root echo "just ran" Thoughts? I have php in my /usr/bin/ folder, but there is also a php5. Should I point to that instead? I did a apt-get install php5-cli, then a tasksel to get the lamp stack. I'm on Ubuntu 10.04 Desktop. Thanks so much! EDIT: Actually, if I try running my new cron, as /usr/bin/php /var/mycron.php, I get a "PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0" EDIT 2: Deleting the # comment from the file lets it run in terminal, Checking others now. - Josh Quote Link to comment Share on other sites More sharing options...
seventheyejosh Posted August 9, 2010 Author Share Posted August 9, 2010 Yup, the comment in the mcrypt was breaking it. Solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.