CommandTriggers

To maintain the same environment for 'cron' tasks as occurs from web requests, we currently invoke curl to registered commands in update.php.

registered commands can be invoked via the 'command' option which will be 'required' by the script with the web environment (config.php, server.local.php) already processed and ready.

To develop a new triggered call in a sandbox the following changes need to occur:

change UNIXUSERNAME and TASKID as appropriate
 * In server.local.php add the following parameters

define('COMMAND_FILE_DIR','/mnt/ebsvol/dev-www/UNIXUSERNAME/public_html/candpweb_TASKID/tools/commands/'); define('COMMAND_API_KEY','UNIXUSERNAMEsandboxapi');


 * add new file in the $SVN/tools/commands directory as:

COMMAND.inc.php

eg: robot-parse-email.inc.php


 * Invoke the script with a curl call:

curl -kv -d"key=UNIXUSERNAMEsandboxapi&command=robot-parse-email" https://dev.worklist.net/~UNIXUSERNAME/candpweb_TASKID/web/update.php