This function is called when a target (like a URL or file) is checked to see if it can be added.

$otca_add - (integer) whether the target can be added (1 means yes, 0 means no); it is preset to the default after checking the "process only" strings and "exclude strings" setting; changing it will override the default and a target can be otherwise added or excluded

$otca_target - the full string of the target

NOTE: String Keywords like CurrentTarget and CurrentTargetWithRedirect can not be used here because this event is called before the actual target object is created.


This example excludes a 'log off URL' (since you probably don't want to be 'logged off' or "signed out" during a job run).

function onTargetCanAdd() {
 if matchRegEx('logoff\.php',0,$otca_target) {