Cron stops working - nothing seems wrong

Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-09 17:20:00

Alright my situation -

My crontab has been set to run at 7 PM EST every day for the past month or so and it has been. About five days ago it just stops working. I ran the PHP code manually from my browser and that went fine. So I filed a support ticket and they said everything is fine.

But it isn't. The tab still is not running. I'm completely baffled by this because it's neither an issue with the tab or my code. Could there be another explanation?

Re: Cron stops working - nothing seems wrong

Posted by: sdayman
Posted on: 2008-05-09 19:18:00

Did you set up your crontab from the panel, or from command line? Can you post the results from "crontab -l" minus any sensitive information?

Another way to test cron is to create a simple job like:
* * * * * /bin/touch ~/testfile

and see if testfile is created and updated every minute.

-Scott

Re: Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-09 19:22:00

The panel. A support guy actually did it for me last month, which is why this makes it all so stranger. I'll take a screen shot, black out my info and post it in a little bit.

http://img99.imageshack.us/img99/6553/wtfzd0.jpg

The blacked out area is simply my user name and website. Maybe my full path stuff changed? :\

Edited by Anthony717 on 05/09/08 07:39 PM (server time).

Re: Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-10 17:14:00

Bump :(

Re: Cron stops working - nothing seems wrong

Posted by: sdayman
Posted on: 2008-05-10 19:12:00

I'd try /usr/local/php5/bin/php /home/ME/PATH/MYCOMMAND.php
Or just /usr/local/bin/php if you want to run php4.

I also don't use the panel interface for cron, so I do it via command line.
http://wiki.dreamhost.com/Crontab

-Scott

Re: Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-10 22:18:00

Ok I'll try that first one - thanks. It's just weird since the support guy set this up for me, lol.

Re: Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-13 22:20:00

Im bumping this because it still isnt working. I tried to look into chmoding the file to different permissions but still nothing. Any other ideas?

Re: Cron stops working - nothing seems wrong

Posted by: sdayman
Posted on: 2008-05-14 05:49:00

If you can run the command from your browser, assuming you mean that there's a URL you can type in the run the command, try setting up a crontab that runs wget or curl to visit that URL.

-Scott

Re: Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-14 08:34:00

Alright cool. Let me try that. Damn weird internet. :P

Re: Cron stops working - nothing seems wrong *DELETED*

Posted by: omnivore
Posted on: 2008-05-15 06:06:00

Post deleted by omnivore

Re: Cron stops working - nothing seems wrong

Posted by: sdayman
Posted on: 2008-05-15 06:37:00

This is a separate issue. Try creating a new thread so we don't hijack the original poster, who has yet to resolve his issue.

-Scott

Re: Cron stops working - nothing seems wrong

Posted by: askapache
Posted on: 2008-05-15 20:23:00

Login via ssh and you can delete and install a new crontab by doing this.

Create a new crontab to run at 7PM every day that executes /home/user/site.com/phpfile.php

echo -e "MAILTO=''\n19 00 * * * /usr/bin/curl -s http://site.com/phpfile.php &>/dev/null" | crontab -





_____

 _  _|  _  _  _  _|_  _
(_|_\|<(_||_)(_|(_| |(/_
|

askapache - before I do that, I have one question:

How do I chmod the file to 755? I tried doing it in the webFTP place but it skips over 755 and goes to the 760's. I think that's what I need to do.

Re: Cron stops working - nothing seems wrong

Posted by: askapache
Posted on: 2008-05-16 18:41:00

you should chmod your .php files 644 with the command

chmod 644 file.php

755 is for directories and some cgi's

ssh and bash is the way to go.

_____

 _  _|  _  _  _  _|_  _
(_|_\|<(_||_)(_|(_| |(/_
|

In reply to:

Login via ssh and you can delete and install a new crontab by doing this.

Create a new crontab to run at 7PM every day that executes /home/user/site.com/phpfile.php

echo -e "MAILTO=''\n19 00 * * * /usr/bin/curl -s http://site.com/phpfile.php &>/dev/null" | crontab -




Alright looks like I've got to do this. Where do I login to SSH?

Edited by Anthony717 on 05/16/08 08:21 PM (server time).

Re: Cron stops working - nothing seems wrong

Posted by: Anthony717
Posted on: 2008-05-18 11:35:00

Bump?

Re: Cron stops working - nothing seems wrong

Posted by: sdayman
Posted on: 2008-05-18 12:37:00

Keep digging through the Wiki for all this, starting with "ssh."

-Scott