Introduction
The cron PHP plugin allows you to run PHP scripts on a regular basis. This can be useful for setting up custom notifications, running maintenance work on your data etc.
The PHP scheduled task plugin will only run if the
Fabrik Cron System Plug-in is installed.
Options
- PHP Script - Located in plugins/fabrik_cron/php/scripts this is the script that will be run
- PHP Set up - Allows you to define variables which can then be accessed in your PHP script. This allows you to create more generic scripts whose parameters can then be modified from this editor window.
On recent version, if you want your script not being triggered any more, you may add the following line :
PHP:
$this->shouldReschedule(false);
It should be at the end of the script or followed by a "return;" statement if you want to immediatly "exit" the script. It will be unpublished, and a log line to that effect added.
Set variable $processed in your php code to get the number in Fabrik's backend "Run" message "xy records updated".