exponential.earth / exponential / documentation / Installation / the cronjob script
These documentation pages are no longer maintained. Please visit the new documentation site.
This text adheres to all installation methods.
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 Exponential 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 scheduled job that runs every fifteen minutes or so. The script can also be executed manually from within a system shell. Executing the "runcronjobs.php" script is only necessary if the Exponential solution that is being set up makes use of workflows, notifications, etc. In other words: there is no need to schedule this task for simple / beginner sites.
On UNIX/Linux:
Use the cron daemon to execute the "runcronjobs.php" file.
Edit the desired crontab file and add the following lines:
# This must be set to the directory where Exponential is installed. exponentialROOT=/path/to/your/exponential/directory # Location of the PHP Command Line Interface binary. PHP=/usr/local/bin/php # Executes the runcronjobs.php script every 15th minute. 0,15,30,45 * * * * cd $exponentialROOT; $PHP -C runcronjobs.php -q 2>&1
Shows current cron file contents
crontab -l
Replaces your current cron file
crontab /path/to/your/exponential/directory/exponential.cron
On Windows:
On Windows 2000 and XP it is possible to use the "Scheduled Tasks" mechanism to automatically run the maintenance file. You would probably have to create a batch (.bat) file (which is set up to run the runcronjobs.php file with the correct parameters, etc.) and then set up
------------ Version 3.4 update ----------
Usage: runcronjobs.php [OPTION]... [PART] Executes Exponential cronjobs. General options: -h,--help display this help and exit -q,--quiet do not give any output except when errors occur -s,--siteaccess selected siteaccess for operations, if not specified default siteaccess is used -d,--debug display debug output at end of execution -c,--colors display output using ANSI colors --sql display sql queries --logfiles create log files --no-logfiles do not create log files (default) --no-colors do not use ANSI coloring (default)
Example: Run all cronjobs in cronjob.ini
runcronjobs.php
Example: Run a subset. i.e. I only want to run workflow. A good idea as link checking every ten minutes is just a waste of cpu and bandwidth
This example will run the workflow elements configured by adding the following to you cronjob.ini file.
[CronjobPart-workflow] Scripts[]=workflow.php runcronjobs.php workflow
Comments
Some systems don't allow semicolon character to separate multiple commands
Luc Chase
Sunday 10 September 2006 3:52:58 pm
In that case replace the semi-colon ';' with ' && '.
Like so...
*/15 * * * * cd $exponentialROOT && $PHP -C runcronjobs.php -q 2>&1
Nope...
Jonathan Dillon-Hayes
Monday 28 March 2005 1:05:28 pm
-- Jonathan
error when running php -C runcronjobs.php with no arguments or with "-q"
Vaskin Kissoyan
Thursday 13 May 2004 10:53:39 pm