Cron job question

Cron job question

Posted by: SleeplessinDC
Posted on: 2009-09-17 15:40:00

I am trying to set up a cron job for a php5 script using the Dreamhost cron job panel. I've tried the way the wiki suggests using the php5 string and the full path:
'/usr/local/php5/bin/php /home/stcwdc/stcwdc.org/wdcblog/wp-content/plugins/jobs/cron'

I get "Could not open input file: /home/stcwdc/stcwdc.org/wdcblog/wp-content/plugin"

I've tried
'/usr/local/php5/lib/php /home/stcwdc/stcwdc.org/wdcblog/jobs/cron'

And I get "sh: /usr/local/php5/lib/php: is a directory"

I've asked the plugin developer about it and he replied:

you should try something along this lines "wget -q --delete-after http://stcwdc.org/wdcblog/jobs/cron"

Is that correct? Where does it go in the commands?

Thanks for your help.

Re: Cron job question

Posted by: andrewf
Posted on: 2009-09-17 16:05:00

> I've tried
> '/usr/local/php5/lib/php /home/stcwdc/stcwdc.org/wdcblog/jobs/cron'
>
> And I get "sh: /usr/local/php5/lib/php: is a directory"

That should be /usr/local/php5/bin/php -- not "lib".

Re: Cron job question

Posted by: SleeplessinDC
Posted on: 2009-09-18 00:22:00

Thanks. I tried that and I still get "Could not open input file"
I tried it two ways:
'/usr/local/php5/bin/php /home/stcwdc/stcwdc.org/wdcblog/jobs/cron'
and
'/usr/local/php5/bin/php /home/stcwdc/stcwdc.org/wdcblog/wp-content/plugins/jobs/cron'

Re: Cron job question

Posted by: sXi
Posted on: 2009-09-18 04:14:00

Is the file cron.php ?

'/usr/local/php5/bin/php /home/stcwdc/stcwdc.org/wdcblog/jobs/cron.php'

'cd /home/stcwdc/stcwdc.org/wdcblog/wp-content/plugins/jobs; /usr/local/php5/bin/php cron.php'


In reply to:

Warning: unlink(/home/stcwdc/stcwdc.org/wdcblog/wp-content/plugins/jobs/tmp/v562sbc7d1322h61bquv4kqag4.png) [function.unlink]: No such file or directory in /home/stcwdc/stcwdc.org/wdcblog/wp-content/plugins/jobs/libraries/Core.php on line 88





How To Install PHP.INI / ionCube on DreamHost

Re: Cron job question

Posted by: SleeplessinDC
Posted on: 2009-09-18 07:17:00

No. There is no cron.php file. The developer's instructions say to point it to jobs/cron. There are two files in the jobs/libraries with cron in the file name and I tried those but they didn't work either. Here is what I asked the developer and his response:
> I am trying to get the cron job set up but I'm not sure which file I need to point it to. Is this correct?
>
> front-end stuff... /domain.name/blog_directory/wp-content/plugins/jobs/libraries/CronLock.php
>
> Or should it go to /libraries/IndexController.php or just to /jobs/cron ?
>
> A sample in the manual would help.
>
>
it should be /jobs/cron, i will add a sample to the manual soon.

What he does say in the current manual is
"Because of different administration software installed on different servers I cannot describe here setting a CRON job, however I can give you a URL which CRON has to visit.
Again assuming you have a WPJobBoard running in jobs directory in the main folder, the notification script can be reached at:
http://example.com/jobs/cron"

"The cron page should be accessed only by cron daemon - real users should not go there."

The plugin is WPJobBoard at http://wpjobboard.net/

Re: Cron job question

Posted by: sXi
Posted on: 2009-09-18 07:49:00

You could pretest a job by logging into shell and typing :

$ /usr/bin/wget -q --delete-after "http://stcwdc.org/wdcblog/jobs/cron"

Then visibly check that it's done whatever work it's supposed to via browser/admin etc.




How To Install PHP.INI / ionCube on DreamHost

Tags: input filedreamhostlibwikithanks for your helpcron jobjobs