X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=misc%2Fcronjobs%2Fmembership_expiry.pl;h=18c40be18f1453e4527cca627b867b17d6619ee7;hb=2b085842554607c08d7b5672b129313008cc619b;hp=41003674e233c8a032c82ccc601479da2a6b20b5;hpb=765225d99f422eb477c9484c3ff1c34419070ff6;p=srvgit diff --git a/misc/cronjobs/membership_expiry.pl b/misc/cronjobs/membership_expiry.pl index 41003674e2..18c40be18f 100755 --- a/misc/cronjobs/membership_expiry.pl +++ b/misc/cronjobs/membership_expiry.pl @@ -139,12 +139,6 @@ any field from the branches table use Modern::Perl; use Getopt::Long qw( GetOptions ); use Pod::Usage qw( pod2usage ); -BEGIN { - # find Koha's Perl modules - # test carefully before changing this - use FindBin (); - eval { require "$FindBin::Bin/../kohalib.pl" }; -} use Koha::Script -cron; use C4::Context; @@ -164,6 +158,8 @@ my $after = 0; my ( $branch, $letter_type ); my @where; +my $command_line_options = join(" ",@ARGV); + GetOptions( 'help|?' => \$help, 'man' => \$man, @@ -180,7 +176,7 @@ GetOptions( pod2usage( -verbose => 2 ) if $man; pod2usage(1) if $help || !$confirm; -cronlogaction(); +cronlogaction({ info => $command_line_options }); my $expdays = C4::Context->preference('MembershipExpiryDaysNotice'); if( !$expdays ) { @@ -231,3 +227,5 @@ while ( my $recent = $upcoming_mem_expires->next ) { }); } } + +cronlogaction({ action => 'End', info => "COMPLETED" });