Cron Problems

wordpress

#1

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/nfl-superbowl.net/wp-content ; 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!


#2

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

          • cd /home/user/nfl-superbowl.net/wp-content ; /usr/local/bin/php -q ./update-feeds.php

-Scott


#3

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


#4

You may need an extra line break after your command.

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

-Matttail


#5

Wel, this is where I’m at now.

          • cd /home/user/nfl-superbowl.net/wp-content ; /user/local/bin/php -q ./update-feeds.php/

Still not working. Any other ideas?


#6

try just running your command from shell. so just type:
cd /home/user/nfl-superbowl.net/wp-content ; /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.

-Matttail


#7

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


#8

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.

-Matttail


#9

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


#10

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

crontab -e

(Then type in…)

          • cd /home/username/nfl-superbowl.net/wp-content ; /usr/local/bin/php -q /homeusername/nfl-superbowl.net/wp-content/update-feeds.php

(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?


Norm


#11

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/nfl-superbowl.net/wp-content ; php -q update-feeds.php


#12

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

          • /usr/local/bin/php%-q /home/username/nfl-superbowl.net/wp-content/update-feeds.php

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


Norm