Forums / General / Running crontabs / Comment58951

Author Topic

Paul Leclercq

Wednesday 05 May 2010 8:10:21 am

Comment58951

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 Exponential 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