Cron stops working - nothing seems wrong


#1

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?


#2

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


#3

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? :\


#4

Bump :frowning:


#5

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


#6

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


#7

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?


#8

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


#9

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


#10

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


#11

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

_____
[color=#00CC00] _ _| _ _ _ _|_ _ (_|_\|<(_||_)(_|(_| |(/_ | [/color]
:~


#12

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.


#13

you should chmod your .php files 644 with the command

chmod 644 file.php755 is for directories and some cgi’s

ssh and bash is the way to go.

_____
[color=#00CC00] _ _| _ _ _ _|_ _ (_|_\|<(_||_)(_|(_| |(/_ | [/color]
:~


#14

[quote]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 -

[/quote]

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


#15

Bump?


#16

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

-Scott