# Action/Trigger entries ----
# Runs all pending A/T events every half hour
-0 */2 * * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending
+0 */2 * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending
# Passive A/T event generation.
# Note: the --granularity flag is not supported in 1.6
# Note: passive event defs with no granularity will be processed regardless of any granularity flags
# Note: push these back to 3am so they will run after the fine generator and spread out the start minute to reduce dogpiling
-0 * * * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly
-5 3 * * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily
-10 3 * * 1-5 . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays
-15 3 * * 0 . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly
-20 3 1 * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly
-25 3 1 1 * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly
+0 * * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly
+5 3 * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily
+10 3 * * 1-5 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays
+15 3 * * 0 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly
+20 3 1 * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly
+25 3 1 1 * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly
# Legacy overdue/predue notice generator. Change to suit.
#XML_FILE_PREFIX = /openils/var/data/overdue/overdue
use strict;
use warnings;
use Getopt::Long;
+use OpenSRF::System;
use OpenSRF::AppSession;
use OpenSRF::Utils::JSON;
use OpenSRF::EX qw(:try);
-require 'oils_header.pl';
+use OpenILS::Utils::Fieldmapper;
my $opt_lockfile = '/tmp/action-trigger-LOCK';
my $opt_osrf_config = '/openils/conf/opensrf_core.xml';
close F;
try {
- osrf_connect($opt_osrf_config);
+ OpenSRF::System->bootstrap_client(config_file => $opt_osrf_config);
+ Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
process_hooks();
run_pending();
} otherwise {