]> git.evergreen-ils.org Git - working/Evergreen.git/blob - docs/admin/actiontriggers_process.adoc
Docs reorg: splitting action/triggers into command-line and staff-client manuals
[working/Evergreen.git] / docs / admin / actiontriggers_process.adoc
1 Processing Action Triggers
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~
3
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:
5
6 ----
7 /openils/bin/action_trigger_runner.pl --process-hooks --run-pending
8 ----
9
10 You have several options when running the script:
11
12 * --run-pending: Run pending events to send emails or take other actions as
13 specified by the reactor in the event definition.
14
15 * --process-hooks: Create hook events
16
17 * --osrf-config=[config_file]: OpenSRF core config file. Defaults to:
18 /openils/conf/opensrf_core.xml
19
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
23
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).
26
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.
30
31 * --granularity=[label]: Limit creating events and running pending events to
32 those only with [label] granularity setting.
33
34 * --debug-stdout: Print server responses to STDOUT (as JSON) for debugging.
35
36 * --lock-file=[file_name]: Sets the lock file for the process.
37
38 * --verbose: Show details of script processing.
39
40 * --help: Show help information.
41
42 Examples:
43
44 * Run all pending events that have no granularity set. This is what you tell
45 CRON to run at regular intervals.
46 +
47 ----
48 perl action_trigger_runner.pl --run-pending
49 ----
50
51 * Batch create all "checkout.due" events
52 +
53 ----
54 perl action_trigger_runner.pl --hooks=checkout.due --process-hooks
55 ----
56
57 * Batch create all events for a specific granularity and to send notices for all
58 pending events with that same granularity.
59 +
60 ----
61 perl action_trigger_runner.pl --run-pending --granularity=Hourly --process-hooks
62 ----
63