1 Processing Action Triggers
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~
4 To run action triggers, an Evergreen administrator will need to run the trigger processing script. This should be set up as a cron job to run periodically. To run the script, use this command:
7 /openils/bin/action_trigger_runner.pl --process-hooks --run-pending
10 You have several options when running the script:
12 * --run-pending: Run pending events to send emails or take other actions as
13 specified by the reactor in the event definition.
15 * --process-hooks: Create hook events
17 * --osrf-config=[config_file]: OpenSRF core config file. Defaults to:
18 /openils/conf/opensrf_core.xml
20 * --custom-filters=[filter_file]: File containing a JSON Object which describes any hooks
21 that should use a user-defined filter to find their target objects. Defaults to:
22 /openils/conf/action_trigger_filters.json
24 * --max-sleep=[seconds]: When in process-hooks mode, wait up to [seconds] for the lock file to go
25 away. Defaults to 3600 (1 hour).
27 * --hooks=hook1[,hook2,hook3,...]: Define which hooks to create events for. If none are defined, it
28 defaults to the list of hooks defined in the --custom-filters option.
29 Requires --process-hooks.
31 * --granularity=[label]: Limit creating events and running pending events to
32 those only with [label] granularity setting.
34 * --debug-stdout: Print server responses to STDOUT (as JSON) for debugging.
36 * --lock-file=[file_name]: Sets the lock file for the process.
38 * --verbose: Show details of script processing.
40 * --help: Show help information.
44 * Run all pending events that have no granularity set. This is what you tell
45 CRON to run at regular intervals.
48 perl action_trigger_runner.pl --run-pending
51 * Batch create all "checkout.due" events
54 perl action_trigger_runner.pl --hooks=checkout.due --process-hooks
57 * Batch create all events for a specific granularity and to send notices for all
58 pending events with that same granularity.
61 perl action_trigger_runner.pl --run-pending --granularity=Hourly --process-hooks