The "runcronjob" script

These documentation pages are no longer maintained. Please visit the new documentation site.

The execution/processing of workflows, notifications and other tasks that should be run periodically must be carried out by an external (non-user/web-dependant) mechanism. This is the job of the "runcronjobs.php" file that resides inside the root of the eZ publish directory. This file takes care of processing the mentioned things and it must be executed periodically. The most common way to do this is to set up a cronjob that runs every 30 minutes or so. The script can also be executed manually.

Let's keep things at a simple level and run the "runcronjobs.php" file manually. You can do this easily by executing the script from within a shell using PHP:

[path_to_dir_containing_php]/php  runcronjobs.php

If "php" is available directly (not in the path environment variable), replace the "[path_to_dir_containing_php]" with the path to the directory that contains the PHP executable. On most UNIX/Linux systems the path is "/usr/bin/". Hint: use the "whereis" command to locate the PHP executable if you're unsure about the location. Windows users can use the built-in search utility to search for "php.exe".

Once the "runcronjobs.php" script is executed, the pending/approved object(s) will be published. Try to surf the TSCM guestbook page again and you'll see that the new (approved) guestbook entry now appears in the list of entries.

Comments

workflows are not dealt with by edfault in runcronjobs

My runcronjobs.php was not doing its duty, and after a while i've discovered that the workflow related script was not executed because it is NOT included in the default settings/cronjob.ini i've got with my ezPublish. I've had to include it by hand to make things work. I've added the line

Scripts[]=workflow.php

at the end of the inizializazion of the Scripts variable.
Hope this helps :)

execution of the runcronjobs.php on linux (Debian)

Remember to have the php4-cli package installed and the mysql.so extension loaded in the /etc/php4/cli/php.ini before executing the runcronjob.php - it's also a good idea to raise the memmory-limit and script-execution time ;-)

No go

I ran the c:\php4\php4.exe runcronjobs.php, and I got this error message:
"PHP is currently using the 'cgi-fcgi' interface. Make sure it is using the 'cli' interface.<br/>"

http://www.ez.no/community/forum/..._have_problem_with_runcronjob_script

use c:\php4\cli\php.exe
(writing this here since it's easier to find solutions here instead of searching this and that....)

Contents

Building an eZ publish site

Prerequisits
Situation
Creating the TSCM site
Testing the interfaces
Setting up the main layout
Creating sections
The welcome page
The news page
The members page
The guestbook
    Creating the content class
    Adding content
    Creating the template
    Adding an action button
    Making the button work
    The input template
    Testing the guestbook
    Implementing an approval mechanism
    Modifying the entry page
    Creating a workflow
    Connecting the workflow to a trigger...
    Approving entries
    The "runcronjob" script
The links page


Created

20/11/2003
11:47:08 am
by Balazs Halasy

Last updated

19/01/2004
4:48:58 pm
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.