Bug 30069: Add edifact-messages to cleanup_database.pl
[srvgit] / misc / cronjobs / membership_expiry.pl
index 4100367..18c40be 100755 (executable)
@@ -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" });