I need a job, a cronjob to be specific...

Author Message

Nathan Moke

Monday 06 June 2005 10:41:47 pm

All,

I trust that someone can point me in the right direction.

I have been using eZ publish for some months now, and up to now, it has served my purposes admirably. I have come to a point, however, where I need to get a number of cronjob related tasks working (e.g. notifications, approvals etc) but Ill be buggered if I can get it to work!

In my particular circumstance, I am attempting to fire up the cronjobs.php script via the browser method. Specifically, I have added additional lines of php script to the index.php file, as suggested by in the eZ Publish Configuration documentation.

<i>include_once(
'kernel/classes/notification/eznotificationeventfilter.php' );
eZNotificationEventFilter::process();</i>

Having added the lines, and refreshed my homepage I note that no notifications have generated, and approved documents are still unpublished (they appear inactive in the admin's collaboration inbox).

In terms of workarounds, I must have tried all manner instructions and suggestions, both in the documentation and the eZ publish forums, with no success (e.g. installing, configuring and running the cli version of the php.exe). What bothers me in particular is that the suggested fixes dont seem to be generating any records or log files. As such, I dont know where I am becoming unstuck.

Bearing in mind that I am not a php or networks specialist, I have a fairly workable understanding of web development tools, systems etc. But having picked at this scab of a problem for a number of weeks now, I am at my wits end!

Fyi I am running eZ Publish 3.50 (windows installer version), on a Windows 2000 box. I have full access to the server.

Help be Ben Kenobi, youre my only hope!

Nathan Moke

Monday 13 June 2005 3:39:29 pm

Cmon people, someone throw me a bone...please

Xavier Dutoit

Tuesday 14 June 2005 12:06:06 am

Hi,

You have to run the cron from the shell (php cli). What's the error message(s) when you run it and what's the command you run ?

If you don't provide some informations about what you've tried and what you get, we won't be able to help you ;)

X+

http://www.sydesy.com

Nathan Moke

Thursday 16 June 2005 6:58:59 pm

Thanks for your reply Xavier. As indicated in my original post, all of the fixes that I attempted did not generate any records or log files (or none that I was able to see anyway).

For example I tried calling the cronjob.php file from the browser, where it then generated the <i>currently using the apache interface blah blah blah</i> error.
I then tried inserting the following script into the index.php file:

<i>include_once('kernel/classes/notification/eznotificationeventfilter.php' );
eZNotificationEventFilter::process();</i>

I refreshed the home page again and then - nothing.
I tried a number of variations of setting up the php.exe and php-cli.exe to run the cronjobs script, such as:
* using the windows scheduler application
* creating batch files and
* configuring php shortcut files
In all of the above examples a command window would open but the text would flash across the box and then close before I had a chance to read it. That said, it didnt launch my runcronjobs.php file anyway, as none of the workflows had been processed.

Good news, however, I had a breakthrough last night! My problem(s) it would seem, were a result of incorrect paths being used to call on the php-cli.exe. Basically I was trying to fire up the php-cli.exe from within the php folder. I SHOULD have called it up from the folder in which the runcronjobs.php file resided.

Given that my site files are in c:\ezpublish\ezpublish and my php files are in c:\ezpublish\php, I was originally typing into the command line the following:
<i>C:\eZpublish\php\php-cli.exe C:\ eZpublish\ eZpublish\runcronjobs.php</i>

What I <b>should</b> have done is first navigated to the root of the site, ie:
<i>C:\ eZpubl~1\ eZpubl~1</i>

Then to that line I should have added:
<i>C:\eZpublish\php\php-cli.exe runcronjobs.php</i>

The full line would look something like this:
<i>C:\EZPUBL~1\EZPUBL~1>c:\ezpubl~1\php\php-cli.exe runcronjobs.php</i>

Concluding, I have now set the php-cli.exe to run in windows scheduler, and amended the appropriate paths. All is well now and I am a happy man :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.