Cron Problems



I am working to set up my forst cron and have encountered a bit of a snag. I edited the job to update a feed in wordpress, and the command saves but never executes. Here is the command line:

          • cd/home/user/ ; php -q update-feeds.php

For a test I wanted it to run every minute, but will change once working.

My other question is, is the command line saving to the right file? When prompted to save, it writes to the file:

File Name to Write: /tmp/crontab.UMa9H2/crontab

Is this right?

Any help would be great!


You need a space after the ‘cd’ command. You should also use the full path for the PHP commands:

          • cd /home/user/ ; /usr/local/bin/php -q ./update-feeds.php



Hmm. Seems it is still not working. Do you have any other suggestions?


You may need an extra line break after your command.

Also, to follw up with file it’s saving, yes that’s correct.



Wel, this is where I’m at now.

          • cd /home/user/ ; /user/local/bin/php -q ./update-feeds.php/

Still not working. Any other ideas?


try just running your command from shell. so just type:
cd /home/user/ ; /user/local/bin/php -q ./update-feeds.php/

And see if you get any errors, hopefully that will help you or someone here figure out what’s wrong.

You can also check the E-mail address for the user you’ve loged in with for any errors that have already been sent out.



Just thought I’d ask, where the text reads “user”, should I leave it as such or should I enter my FTP user info?


it should be the user for the domain. The user name you use to connect to the domain for FTP should be put in there instead of ‘user’. That will make a big difference with gettings this command to work.



I changed the text ‘user’ to the actual username and still nothing. This sucks!


Have you tried running it with full pathnames on all options so you have:

crontab -e

(Then type in…)

          • cd /home/username/ ; /usr/local/bin/php -q /homeusername/

(That is all on one lane and amend the pathname to where update-feeds.php actually is,and username is the ftp/cgi account username)

(Press return to leave a blank line)

Control-o to save then control-x to exit.

See how that goes.

That semi-colon in your line. Is it supposed to be there?



OK, I ran the command from the prompt and i worked, but still doesnt seem to run on a schedule. Here is the command I ran:

cd /home/user/ ; php -q update-feeds.php


Have you tried without the cd part and just the last part.

          • /usr/local/bin/php%-q /home/username/

Use % before any text input to a command in a crontab.