Cron job question

software development

#1

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.


#2

[quote]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”

[/quote]

That should be /usr/local/php5/bin/php – not “lib”.


#3

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’


#4

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’

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

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:

[quote]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.

[/quote]

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/


#6

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

[color=#00CC00]$[/color] /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.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost