crontab problems

crontab problems

Posted by: rodmac
Posted on: 2007-04-04 01:03:00

I am trying to load a cron job for a wordpress plugin, but seem to have hit a brick wall.
Trying to load this using SSH when logged in to username@XXXX/dreamhost.com which is the root of my account, which holds several domains.
"#!/usr/local/bin/php -q
15 10 * * * wget -O /dev/null
http://www.mydomain.com/blog/wp-content/plugins/post_schedule_ping_optimizer/pspo-cron.php"
What I get back is that there is a problem with the minutes entry in the file, but I can't see a problem there.
I have shell rights, and getting access, so that seems ok.
The file created on crontab -e is odd: "/tmp/crontab.tvKJkz/crontab"
The problem may be obvious to an expert, and after several hours of head scratching I really would appreciate some help! Thanks.

Re: crontab problems

Posted by: Tor
Posted on: 2007-04-04 03:35:00

In reply to:

"#!/usr/local/bin/php -q
15 10 * * * wget -O /dev/null
http://www.mydomain.com/blog/wp-content/plugins/post_schedule_ping_optimizer/pspo-cron.php"
What I get back is that there is a problem with the minutes entry


You don't need the shebang line, #!/usr/local/bin/php -q , in crontab. You need to start with the date-time part:

15 10 * * * ...

All in one line, might need full path to wget...

tor.eff.org
Promos: MaxTOR: Save Maximum TOR: Save Maximum and give $1 to TOR

Re: crontab problems

Posted by: rodmac
Posted on: 2007-04-04 08:14:00

Thanks for your input
Tried this:
15 10 * * * /usr/bin/wget -O /dev/null http://www.mydomain.com/blog/wp-content/plugins/post_schedule_ping_optimizer/pspo-cron.php
and it installed ... but only after a lot of trying to get rid an invisible line break! Next step is to verify it works.

Tags: crontabcron jobmydomaindreamhostbrick wallxxxxwpwgetsshtmpwordpressusrshellblog