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.

eZ debug

Timing: Jan 19 2025 09:57:24
Script start
Timing: Jan 19 2025 09:57:24
Module start 'layout'
Timing: Jan 19 2025 09:57:24
Module start 'content'
Timing: Jan 19 2025 09:57:24
Module end 'content'
Timing: Jan 19 2025 09:57:24
Script end

Main resources:

Total runtime0.0185 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 590.4141152.6406
Module start 'layout' 0.00610.0042 743.054739.4922
Module start 'content' 0.01020.0061 782.546993.3984
Module end 'content' 0.01630.0022 875.945338.3047
Script end 0.0185  914.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002614.0213140.0002
Check MTime0.00126.2411140.0001
Mysql Total
Database connection0.00094.715010.0009
Mysqli_queries0.003719.900230.0012
Looping result0.00000.108310.0000
Template Total0.00179.410.0017
Template load0.00105.579910.0010
Template processing0.00073.816610.0007
Override
Cache load0.00063.400310.0006
General
dbfile0.001910.066880.0002
String conversion0.00000.076040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs