DreamHost Web Hosting
Discussion Forum


Forums
   >> Programming
*Threaded Mode

Subject crontab problems  
Posted byrodmac (DH New User )
Posted on04/04/07 01:03 AM



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.



Subject Re: crontab problems new [re: rodmac]  
Posted byTor (DH Enthusiast)
Posted on04/04/07 03:35 AM



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

Subject Re: crontab problems new [re: Tor]  
Posted byrodmac (DH New User )
Posted on04/04/07 08:14 AM



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.




*Threaded Mode
Jump to