Jump to content

My Cron Won't Run!


seventheyejosh

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/210254-my-cron-wont-run/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.