Running crontabs

Running crontabs

Thursday 22 April 2010 4:54:21 pm - 2 replies

Author Message

cliffp pratt

Wednesday 28 April 2010 9:28:07 pm

Update - I can run cronparts as long as they are in the base settings/crontab.ini. Can anyone please help?

Cheers,

Cliff

Paul Leclercq

Wednesday 05 May 2010 8:10:21 am

You seem to have got something badly wrong here, this is the setting you should be using:

[CronjobSettings]
ExtensionDirectories[]=exportcsv
[CronjobPart-exportcsv]
Scripts[]=exportcsv.php

you then execute your cronpart from the root of your project this way:

php runcronjobs.php exportcsv

In that exemple the name of your cronpart is just behind the
[CronjobPart-NAME_OF_CRONPART]

php runcronjobs.php NAME_OF_CRONPART

If you then wish to run this from a crontab you will need to do write something like this in your /etc/crontab file:

-------------------------------------------------------
# This must be set to the directory where eZ Publish is installed.
EZPUBLISHROOT=/var/www/myproject_name/www
# Location of the PHP Command Line Interface binary.
PHP=/usr/bin/php

# Every ten minutes
*/10 * * * * su - www-data -c "cd $EZPUBLISHROOT && $PHP runcronjobs.php ezflow" > /tmp/ezflow.cron.log 2>&1

----------------------------------------------------------

But you have much better information here:
http://ez.no/doc/ez_publish/technical_manual/4_x/features/cronjobs/running_cronjobs

You must be logged in to post messages in this topic!

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