2 # ---------------------------------------------------------------------
4 # hold_targeter.pl <config_file> <lock_file>
5 # ---------------------------------------------------------------------
9 use OpenSRF::Utils::JSON;
12 my $config = shift || die "bootstrap config required\n";
13 my $lockfile = shift || "/tmp/hold_targeter-LOCK";
16 die "I seem to be running already. If not remove $lockfile, try again\n";
19 open(F, ">$lockfile");
23 OpenSRF::System->bootstrap_client( config_file => $config );
25 my $r = OpenSRF::AppSession
26 ->create( 'open-ils.storage' )
27 ->request( 'open-ils.storage.action.hold_request.copy_targeter' => '24h' );
29 while (!$r->complete) { $r->recv };