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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.