Lines 26-56
use C4::Log qw( cronlogaction );
Link Here
|
26 |
use Getopt::Long qw( GetOptions ); |
26 |
use Getopt::Long qw( GetOptions ); |
27 |
use Try::Tiny qw( catch try ); |
27 |
use Try::Tiny qw( catch try ); |
28 |
|
28 |
|
29 |
my $username = undef; |
29 |
my $username = undef; |
30 |
my $password = undef; |
30 |
my $password = undef; |
31 |
my $limit = undef; |
31 |
my $limit = undef; |
32 |
my $branchcode = undef; |
32 |
my $branchcode = undef; |
33 |
my $method = 'LOGIN'; |
33 |
my $method = 'LOGIN'; |
34 |
my $help = 0; |
34 |
my $help = 0; |
35 |
my $verbose = 0; |
35 |
my $verbose = 0; |
36 |
my $where; |
36 |
my $where; |
37 |
my @type; |
37 |
my @type; |
38 |
my @letter_code; |
38 |
my @letter_code; |
39 |
my $exit_on_plugin_failure = 0; |
39 |
my $exit_on_plugin_failure = 0; |
40 |
|
40 |
|
41 |
my $command_line_options = join(" ",@ARGV); |
41 |
my $command_line_options = join( " ", @ARGV ); |
42 |
|
42 |
|
43 |
GetOptions( |
43 |
GetOptions( |
44 |
'u|username:s' => \$username, |
44 |
'u|username:s' => \$username, |
45 |
'p|password:s' => \$password, |
45 |
'p|password:s' => \$password, |
46 |
'l|limit:s' => \$limit, |
46 |
'l|limit:s' => \$limit, |
47 |
'b|branchcode:s' => \$branchcode, |
47 |
'b|branchcode:s' => \$branchcode, |
48 |
'm|method:s' => \$method, |
48 |
'm|method:s' => \$method, |
49 |
'h|help|?' => \$help, |
49 |
'h|help|?' => \$help, |
50 |
'v|verbose' => \$verbose, |
50 |
'v|verbose' => \$verbose, |
51 |
't|type:s' => \@type, |
51 |
't|type:s' => \@type, |
52 |
'c|code:s' => \@letter_code, |
52 |
'c|code:s' => \@letter_code, |
53 |
'w|where:s' => \$where, |
53 |
'w|where:s' => \$where, |
54 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
54 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
55 |
); |
55 |
); |
56 |
my $usage = << 'ENDUSAGE'; |
56 |
my $usage = << 'ENDUSAGE'; |
Lines 130-136
C4::Letters::SendQueuedMessages(
Link Here
|
130 |
type => \@type, |
130 |
type => \@type, |
131 |
letter_code => \@letter_code, |
131 |
letter_code => \@letter_code, |
132 |
where => $where, |
132 |
where => $where, |
133 |
branchcode => $branchcode, |
133 |
branchcode => $branchcode, |
134 |
} |
134 |
} |
135 |
); |
135 |
); |
136 |
|
136 |
|
137 |
- |
|
|