Bug 42714: Remove redundant manual cronlogaction calls from scripts
Remove start/end cronlogaction calls and unused C4::Log imports from scripts that use Koha::Script, as these are now handled automatically by the INIT/END blocks. Scripts with mid-execution informational logging (plugins_nightly, harvest_oai, fines, process_message_queue) retain their C4::Log import and non-start/end cronlogaction calls. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
ecd056b21d
commit
996aefd280
|
|
@ -45,7 +45,6 @@ use C4::Context;
|
|||
use C4::Letters;
|
||||
use C4::Members;
|
||||
use C4::Members::Messaging;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Items;
|
||||
use Koha::Libraries;
|
||||
use Koha::Patrons;
|
||||
|
|
@ -184,10 +183,6 @@ my $itemscontent = join( ',', qw( date_due title author barcode ) );
|
|||
|
||||
my $help = 0;
|
||||
my $man = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
@ -702,8 +697,6 @@ PATRON: while ( my ( $borrowernumber, $digest ) = each %{ $params->{digests} } )
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ use Koha::Script -cron;
|
|||
use C4::Context;
|
||||
use Koha::Patrons;
|
||||
use Getopt::Long;
|
||||
use C4::Log;
|
||||
|
||||
sub usage {
|
||||
print STDERR <<USAGE;
|
||||
|
|
@ -75,8 +74,6 @@ unless ($confirm) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
cronlogaction();
|
||||
|
||||
my $rows = Koha::Patrons->anonymize_last_borrowers();
|
||||
$verbose and print int($rows) . " item's last borrowers anonymized.\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -20,12 +20,5 @@
|
|||
use Modern::Perl;
|
||||
use Koha::Checkouts;
|
||||
use Koha::Script -cron;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
Koha::Checkouts->automatic_checkin;
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,6 @@ use JSON;
|
|||
use Koha::Script -cron;
|
||||
use C4::Context;
|
||||
use C4::Items;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
# Getting options
|
||||
my ( $verbose, $help, $confirm );
|
||||
|
|
@ -50,8 +46,6 @@ if ($verbose) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
exit(0);
|
||||
|
||||
__END__
|
||||
|
|
|
|||
|
|
@ -81,15 +81,10 @@ use Getopt::Long qw( GetOptions );
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Context;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use C4::Letters;
|
||||
use Koha::Checkouts;
|
||||
use Koha::Libraries;
|
||||
use Koha::Patrons;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $help, $send_notices, $verbose, $confirm, $digest_per_branch );
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
|
|
@ -176,8 +171,6 @@ DATA_LOOP:
|
|||
_ProcessRenewals( \@auto_renews );
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 _ProcessRenewals
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ use Modern::Perl;
|
|||
use Koha::Script -cron;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
use Koha::Database;
|
||||
use Koha::DateUtils qw(dt_from_string output_pref);
|
||||
|
|
@ -42,10 +41,6 @@ Note: If the system preference 'AnonymousPatron' is not defined, NULL will be us
|
|||
USAGE
|
||||
exit $_[0];
|
||||
}
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $help, $days, $verbose );
|
||||
|
||||
GetOptions(
|
||||
|
|
@ -79,6 +74,4 @@ $rows = Koha::Old::Holds->filter_by_anonymizable->filter_by_last_update( { days
|
|||
|
||||
$verbose and print int($rows) . " holds anonymised.\n";
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
exit(0);
|
||||
|
|
|
|||
|
|
@ -13,12 +13,7 @@ use Time::HiRes qw(gettimeofday);
|
|||
use ZOOM;
|
||||
use MARC::File::USMARC;
|
||||
use Getopt::Long;
|
||||
use C4::Log;
|
||||
use Koha::Biblios;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $input_marc_file, $number ) = ( '', 0 );
|
||||
my ( $version, $confirm, $field, $batch, $max_digits, $cloud_tag );
|
||||
GetOptions(
|
||||
|
|
@ -174,8 +169,6 @@ if ($cloud_tag) {
|
|||
my $timeneeded = time() - $starttime;
|
||||
print "$i records done in $timeneeded seconds\n" unless $batch;
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
sub dewey_french {
|
||||
return {
|
||||
"0" => "Généralités (Ouvrages généraux (encyclopédies, bibliographies, etc.) et informatique)",
|
||||
|
|
|
|||
|
|
@ -30,16 +30,11 @@ use warnings;
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Items qw( CartToShelf );
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
use C4::Context;
|
||||
use Getopt::Long qw( GetOptions );
|
||||
|
||||
my $hours = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions( 'h|hours=s' => \$hours, );
|
||||
|
||||
my $usage = <<'ENDUSAGE';
|
||||
|
|
@ -68,4 +63,3 @@ while ( my ($itemnumber) = $sth->fetchrow_array ) {
|
|||
CartToShelf($itemnumber);
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ use Koha::Script -cron;
|
|||
|
||||
use C4::Accounts qw( purge_zero_balance_fees );
|
||||
use C4::Context;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use C4::Search::History;
|
||||
use C4::Search;
|
||||
use Koha::BackgroundJobs;
|
||||
|
|
@ -185,10 +184,6 @@ my $jobs_days;
|
|||
my @jobs_types;
|
||||
my $reports;
|
||||
my $edifact_msg_days;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
'confirm' => \$confirm,
|
||||
|
|
@ -863,8 +858,6 @@ if ($edifact_msg_days) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
exit(0);
|
||||
|
||||
sub RemoveOldSessions {
|
||||
|
|
|
|||
|
|
@ -28,15 +28,10 @@ use Getopt::Long qw( GetOptions );
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Context qw($context);
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my $verbose = 0;
|
||||
my $help = 0;
|
||||
my $conf = '';
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'verbose' => \$verbose,
|
||||
'help' => \$help,
|
||||
|
|
@ -88,8 +83,6 @@ for my $cloud (@clouds) {
|
|||
}
|
||||
$original_context->set_context;
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
package ZebraIndex;
|
||||
|
||||
use strict;
|
||||
|
|
|
|||
|
|
@ -73,12 +73,6 @@ use Pod::Usage qw( pod2usage );
|
|||
use Koha::Script -cron;
|
||||
use Koha::Patrons;
|
||||
use Koha::Patron::Debarments;
|
||||
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $amount, $help, $confirm, $message, $expiration, $file, $verbose );
|
||||
GetOptions(
|
||||
'a|amount:i' => \$amount,
|
||||
|
|
@ -128,8 +122,6 @@ my $verb = $confirm ? 'Debarred' : 'Found';
|
|||
print "debar_patrons_with_fines: $verb $count_patrons patrons";
|
||||
print( $errors ? ", had $errors failures\n" : "\n" );
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
sub getMessageContent {
|
||||
return $message if ($message);
|
||||
open( my $FH, "<:encoding(UTF-8)", $file ) or die "Could not open $file: $!\n";
|
||||
|
|
|
|||
|
|
@ -9,16 +9,11 @@ use Koha::Script -cron;
|
|||
use C4::Members qw( GetBorrowersToExpunge );
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::Patrons;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my (
|
||||
$help, $verbose, $not_borrowed_since, $expired_before, $last_seen,
|
||||
@category_code, $branchcode, $file, @without_restriction_types, $confirm
|
||||
);
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
'v|verbose' => \$verbose,
|
||||
|
|
@ -158,8 +153,6 @@ for my $member (@$members) {
|
|||
|
||||
say $confirm ? "$deleted patrons deleted" : "$deleted patrons would have been deleted" if $verbose;
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
=head1 NAME
|
||||
|
||||
delete_patrons - This script deletes patrons
|
||||
|
|
|
|||
|
|
@ -36,14 +36,10 @@ use Koha::EDI qw( process_quote process_invoice process_ordrsp );
|
|||
use Koha::Edifact::Transport;
|
||||
use Koha::Logger;
|
||||
use Koha::Plugins::Handler;
|
||||
use Fcntl qw( LOCK_EX O_CREAT O_RDWR SEEK_SET );
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Fcntl qw( LOCK_EX O_CREAT O_RDWR SEEK_SET );
|
||||
|
||||
die "Syspref 'EDIFACT' is disabled" unless C4::Context->preference('EDIFACT');
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
# we dont have a lock dir in context so use the logdir
|
||||
my $logdir = C4::Context->config('logdir');
|
||||
my $pidfile = "$logdir/edicron.pid";
|
||||
|
|
@ -146,8 +142,6 @@ foreach my $response (@downloaded_responses) {
|
|||
process_ordrsp($response);
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
if ( close $pid_handle ) {
|
||||
unlink $pidfile;
|
||||
exit 0;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ use Getopt::Long qw( GetOptions );
|
|||
use Pod::Usage qw( pod2usage );
|
||||
use POSIX;
|
||||
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::ERM::EUsage::UsageDataProviders;
|
||||
use Koha::Script -cron;
|
||||
|
|
@ -106,9 +105,6 @@ C<erm_run_harvester.pl --begin-date 2000-01-01 --end-date 2024-01-01 --debug --d
|
|||
|
||||
=cut
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
# Command line option values
|
||||
my $help = 0;
|
||||
my $man = 0;
|
||||
|
|
@ -185,8 +181,6 @@ while ( my $udprovider = $udproviders->next ) {
|
|||
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
sub debug_msg {
|
||||
my ($msg) = @_;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ my $log;
|
|||
my $maxdays;
|
||||
my $verify_issue;
|
||||
|
||||
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
'v|verbose' => \$verbose,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ use C4::Templates;
|
|||
use File::Spec;
|
||||
use Pod::Usage qw( pod2usage );
|
||||
use Getopt::Long qw( GetOptions );
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
use Koha::DateUtils qw( dt_from_string output_pref );
|
||||
use Koha::Email;
|
||||
|
|
@ -28,10 +27,6 @@ my (
|
|||
$send,
|
||||
@emails,
|
||||
);
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
$send = 1;
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
|
|
@ -145,8 +140,6 @@ if (@emails) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
sub print_notices {
|
||||
my ($params) = @_;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ use Koha::OAI::Client::Harvester;
|
|||
use Koha::OAIServers;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Try::Tiny qw( catch try );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $help, $verbose, $id, $days, $list, $force );
|
||||
|
||||
GetOptions(
|
||||
|
|
@ -104,8 +100,6 @@ my $harvester =
|
|||
Koha::OAI::Client::Harvester->new( { server => $server, days => $days, force => $force, logger => \&logFunction } );
|
||||
$harvester->init();
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
sub logFunction {
|
||||
my $message = shift;
|
||||
print $message . "\n" if ($verbose);
|
||||
|
|
|
|||
|
|
@ -24,11 +24,5 @@ use warnings;
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Reserves qw(AutoUnsuspendReserves);
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
AutoUnsuspendReserves();
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ use Pod::Usage qw( pod2usage );
|
|||
|
||||
use C4::Context;
|
||||
use C4::HoldsQueue qw(CreateQueue);
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Script -cron;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -63,10 +62,6 @@ my $help = 0;
|
|||
my $man = 0;
|
||||
my $force = 0;
|
||||
my $unallocated = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
'm|man' => \$man,
|
||||
|
|
@ -87,4 +82,3 @@ if ( $rthq && !$force ) {
|
|||
my $loops = C4::Context->preference('HoldsQueueParallelLoopsCount');
|
||||
CreateQueue( { loops => $loops, unallocated => $unallocated } );
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ use Pod::Usage qw( pod2usage );
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Reserves;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
|
|
@ -64,10 +63,6 @@ Optionally adds a reason for cancellation (which will trigger a notice to be sen
|
|||
|
||||
my $help = 0;
|
||||
my $reason;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'reason=s' => \$reason
|
||||
|
|
@ -76,4 +71,3 @@ pod2usage(1) if $help;
|
|||
|
||||
C4::Reserves::CancelExpiredReserves($reason);
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -23,13 +23,10 @@ use Pod::Usage qw( pod2usage );
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Reserves;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Holds;
|
||||
use Koha::Calendar;
|
||||
use Koha::Libraries;
|
||||
|
||||
cronlogaction();
|
||||
|
||||
=head1 NAME
|
||||
|
||||
cancel_unfilled_holds.pl - script to delete unfilled holds after a given
|
||||
|
|
@ -84,10 +81,6 @@ my $use_calendar = 0;
|
|||
my $verbose = 0;
|
||||
my $confirm = 0;
|
||||
my $reason;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'h|help|?' => \$help,
|
||||
'days=s' => \$days,
|
||||
|
|
@ -147,4 +140,3 @@ foreach my $branch (@branchcodes) {
|
|||
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use DateTime::Duration;
|
|||
|
||||
use C4::Context;
|
||||
use C4::Letters;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::Calendar;
|
||||
use Koha::Libraries;
|
||||
|
|
@ -174,10 +173,6 @@ my $use_calendar = 0;
|
|||
my $date_input;
|
||||
my $opt_out = 0;
|
||||
my @mtts;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
@ -332,4 +327,3 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP
|
|||
|
||||
} #END BRANCH LOOP
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ use Pod::Usage qw( pod2usage );
|
|||
|
||||
use C4::Circulation qw( LostItem MarkIssueReturned );
|
||||
use C4::Context;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Checkout;
|
||||
use Koha::Checkouts;
|
||||
use Koha::Items;
|
||||
|
|
@ -57,10 +56,6 @@ my $man = 0;
|
|||
my $list_categories = 0;
|
||||
my $list_itemtypes = 0;
|
||||
my @skip_lost_values;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'l|lost=s%' => \$lost,
|
||||
'c|charge=s' => \$charge,
|
||||
|
|
@ -581,4 +576,3 @@ if ( !$quiet ) {
|
|||
print "\nTOTAL: $total items\n";
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -62,12 +62,6 @@ use File::Copy qw( copy move );
|
|||
use Koha::Script -cron;
|
||||
use Koha::MarcOrder;
|
||||
use Koha::MarcOrderAccounts;
|
||||
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $help, $verbose, $confirm, $delete );
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
|
|
@ -142,4 +136,3 @@ foreach my $acct (@accounts) {
|
|||
print "Moving to next account\n\n";
|
||||
}
|
||||
print "Process complete\n";
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -168,7 +168,6 @@ use Pod::Usage qw( pod2usage );
|
|||
use Koha::Script -cron;
|
||||
use C4::Context;
|
||||
use C4::Letters;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
use Koha::Patrons;
|
||||
|
||||
|
|
@ -188,10 +187,6 @@ my $inactive;
|
|||
my $renew;
|
||||
my $letter_expiry;
|
||||
my $letter_renew;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
@ -300,4 +295,3 @@ if ($verbose) {
|
|||
print "Skipped $count_skipped active patrons\n" if $inactive;
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -7,14 +7,12 @@ use Time::HiRes qw( gettimeofday );
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::AuthoritiesMarc qw( GetAuthority merge );
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Authority::MergeRequests;
|
||||
|
||||
use constant RESET_HOURS => 24;
|
||||
use constant REMOVE_DAYS => 30;
|
||||
|
||||
my ($params);
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
GetOptions(
|
||||
'h' => \$params->{help},
|
||||
'v' => \$params->{verbose},
|
||||
|
|
@ -23,7 +21,6 @@ GetOptions(
|
|||
|
||||
$| = 1; # flushes output
|
||||
if ( $params->{batch} ) {
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
handle_batch($params);
|
||||
} else {
|
||||
pod2usage(1);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ use Koha::Script -cron;
|
|||
use C4::Context;
|
||||
use C4::Letters;
|
||||
use C4::Overdues qw( GetOverdueMessageTransportTypes parse_overdues_letter );
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Patron::Debarments qw( AddUniqueDebarment );
|
||||
use Koha::DateUtils qw( dt_from_string output_pref );
|
||||
use Koha::Calendar;
|
||||
|
|
@ -341,10 +340,6 @@ my $itemscontent = join( ',', qw( date_due title barcode author itemnumber ) );
|
|||
my @myborcat;
|
||||
my @myborcatout;
|
||||
my ( $date_input, $today );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
@ -1056,4 +1051,3 @@ sub _get_html_end {
|
|||
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ use Koha::Script -cron;
|
|||
use Getopt::Long qw( GetOptions );
|
||||
use Pod::Usage qw( pod2usage );
|
||||
|
||||
use C4::Log qw( cronlogaction );
|
||||
use C4::Reports::Guided qw( EmailReport );
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -116,10 +115,6 @@ my $error_msgs = {
|
|||
NO_FROM_COL => "No from email was specified for row ",
|
||||
NO_BOR => "There is no borrower with borrowernumber "
|
||||
};
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'report=i' => \$report_id,
|
||||
|
|
@ -175,4 +170,3 @@ if ( $verbose || !$commit ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ use Koha::Logger;
|
|||
use Koha::Plugins;
|
||||
use Koha::Script -cron;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my $metadata;
|
||||
my $help;
|
||||
GetOptions(
|
||||
|
|
@ -46,8 +43,6 @@ if ( C4::Context->config("enable_plugins") ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
=head1 NAME
|
||||
|
||||
plugins_nightly.pl - Run nightly tasks specified by plugins
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ my @type;
|
|||
my @letter_code;
|
||||
my $exit_on_plugin_failure = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'u|username:s' => \$username,
|
||||
'p|password:s' => \$password,
|
||||
|
|
@ -104,4 +101,3 @@ C4::Letters::SendQueuedMessages(
|
|||
}
|
||||
);
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -23,14 +23,9 @@ use Getopt::Long qw( GetOptions );
|
|||
|
||||
use Koha::Script -cron;
|
||||
use C4::Suggestions;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use C4::Context;
|
||||
|
||||
my ( $help, $days, $confirm, $verbose );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'days:i' => \$days,
|
||||
|
|
@ -73,4 +68,3 @@ if ( !$confirm || $help || !defined($days) ) {
|
|||
warn "This script requires a positive number of days. Aborted.\n";
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -33,11 +33,6 @@ BEGIN {
|
|||
use Koha::Script -cron;
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::Recalls;
|
||||
use C4::Log;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my $recalls = Koha::Recalls->search( { completed => 0 } );
|
||||
my $today = dt_from_string()->truncate( to => 'day' );
|
||||
|
|
@ -77,4 +72,3 @@ while ( my $recall = $recalls->next ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -32,11 +32,6 @@ use Koha::Script -cron;
|
|||
use Koha::DateUtils;
|
||||
use Koha::Checkouts;
|
||||
use Koha::Recalls;
|
||||
use C4::Log;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my $recalls = Koha::Recalls->search( { status => 'requested' } );
|
||||
while ( my $recall = $recalls->next ) {
|
||||
|
|
@ -45,4 +40,3 @@ while ( my $recall = $recalls->next ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -56,17 +56,12 @@ use Pod::Usage qw( pod2usage );
|
|||
use Try::Tiny qw( catch try );
|
||||
|
||||
use Koha::Script -cron;
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
use Koha::Account::Lines;
|
||||
use Koha::Patrons;
|
||||
|
||||
my $help = 0;
|
||||
my $verbose = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help' => \$help,
|
||||
'verbose' => \$verbose
|
||||
|
|
@ -116,8 +111,6 @@ while ( my $patron = $patrons->next ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use Koha::Script -cron;
|
|||
use C4::Reports::Guided qw( store_results execute_query );
|
||||
use Koha::Reports;
|
||||
use C4::Context;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Email;
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::File::Transports;
|
||||
|
|
@ -208,10 +207,6 @@ my $filename = undef;
|
|||
my $username = undef;
|
||||
my $password = undef;
|
||||
my $method = 'LOGIN';
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
@ -429,4 +424,3 @@ foreach my $report_id (@ARGV) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use Koha::Script -cron;
|
|||
use C4::Context;
|
||||
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
|
||||
use C4::Serials::Frequency;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
|
||||
use Date::Calc qw( check_date Date_to_Days );
|
||||
|
|
@ -58,10 +57,6 @@ my $confirm = 0;
|
|||
my $verbose = 0;
|
||||
my $note = '';
|
||||
my $nonote = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|h|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
@ -120,4 +115,3 @@ while ( my $issue = $sth->fetchrow_hashref ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@ use Getopt::Long qw( GetOptions );
|
|||
use Koha::Script -cron;
|
||||
use C4::Context;
|
||||
use C4::UsageStats;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use POSIX qw( strftime );
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
use POSIX qw( strftime );
|
||||
my ( $help, $verbose, $force, $quiet );
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
|
|
@ -46,8 +41,6 @@ C4::Context->set_preference(
|
|||
strftime( "%s", localtime )
|
||||
);
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
=head1 NAME
|
||||
|
||||
share_usage_with_koha_community.pl - Share your library's usage with the Koha community
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ use Koha::Script -cron;
|
|||
use C4::Context;
|
||||
use C4::Overdues qw( CalcFine checkoverdues GetFine Getoverdues );
|
||||
use C4::Calendar qw(); # don't need any exports from Calendar
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Getopt::Long qw( GetOptions );
|
||||
use List::MoreUtils qw( none );
|
||||
use Koha::DateUtils qw( dt_from_string output_pref );
|
||||
|
|
@ -51,10 +50,6 @@ my $borrowernumberlimit;
|
|||
my $borrowersalreadyapplied; # hashref of borrowers for whom we already applied the fine, so it's only applied once
|
||||
my $debug = 0;
|
||||
my $bigdebug = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
'v|verbose' => \$verbose,
|
||||
|
|
@ -259,4 +254,3 @@ Number of Overdue Items:
|
|||
EOM
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
use Modern::Perl;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Log qw(cronlogaction);
|
||||
use Getopt::Long qw( GetOptions );
|
||||
use Pod::Usage qw( pod2usage );
|
||||
use Koha::Logger;
|
||||
|
|
@ -169,10 +168,6 @@ my $reg_aft;
|
|||
my $branch_lim;
|
||||
my %fields;
|
||||
my @where;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'man' => \$man,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ use Koha::Script -cron;
|
|||
use Koha::DateUtils qw( dt_from_string );
|
||||
use C4::Context;
|
||||
use C4::Biblio qw( UpdateTotalIssues );
|
||||
use C4::Log qw( cronlogaction );
|
||||
use DateTime;
|
||||
use DateTime::Format::MySQL;
|
||||
use Time::HiRes qw( time );
|
||||
|
|
@ -51,10 +50,6 @@ my $useitems = 0;
|
|||
my $incremental = 0;
|
||||
my $progress = 100;
|
||||
my $unit;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my $result = GetOptions(
|
||||
'v|verbose' => \$verbose,
|
||||
't|test' => \$test_only,
|
||||
|
|
@ -103,8 +98,6 @@ process_stats() if $usestats;
|
|||
|
||||
report();
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
exit 0;
|
||||
|
||||
sub process_items {
|
||||
|
|
|
|||
|
|
@ -6,16 +6,10 @@ use feature 'say';
|
|||
use Getopt::Long qw( GetOptions );
|
||||
use Pod::Usage qw( pod2usage );
|
||||
|
||||
use C4::Log qw( cronlogaction );
|
||||
|
||||
use Koha::Account::Lines;
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
|
||||
use Koha::Script -cron;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my ( $help, $verbose, @type, $before, $after, @category_code, $file, $confirm );
|
||||
GetOptions(
|
||||
'h|help' => \$help,
|
||||
|
|
@ -142,8 +136,6 @@ while ( my $line = $lines->next ) {
|
|||
}
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
exit(0);
|
||||
|
||||
__END__
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use Pod::Usage qw( pod2usage );
|
|||
|
||||
use Koha::Script;
|
||||
use Koha::Patrons::Import;
|
||||
use C4::Log qw( cronlogaction );
|
||||
my $Import = Koha::Patrons::Import->new();
|
||||
|
||||
my $csv_file;
|
||||
|
|
@ -42,8 +41,6 @@ my $update_dateexpiry;
|
|||
my $update_dateexpiry_from_today;
|
||||
my $update_dateexpiry_from_existing;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
|
||||
GetOptions(
|
||||
'c|confirm' => \$confirm,
|
||||
'f|file=s' => \$csv_file,
|
||||
|
|
@ -67,7 +64,6 @@ pod2usage(q|--file is required|) unless $csv_file;
|
|||
pod2usage(q|--matchpoint is required|) unless $matchpoint;
|
||||
|
||||
if ($confirm) {
|
||||
cronlogaction( { action => 'Run', info => $command_line_options } );
|
||||
} else {
|
||||
warn "Running in dry-run mode, provide --confirm to apply the changes\n";
|
||||
}
|
||||
|
|
@ -135,7 +131,6 @@ my $info =
|
|||
. $total;
|
||||
|
||||
if ($confirm) {
|
||||
cronlogaction( { action => 'End', info => $info } );
|
||||
}
|
||||
|
||||
=head1 NAME
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use C4::Biblio qw(
|
|||
LinkBibHeadingsToAuthorities
|
||||
ModBiblio
|
||||
);
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Biblios;
|
||||
use Getopt::Long qw( GetOptions );
|
||||
use Pod::Usage qw( pod2usage );
|
||||
|
|
@ -54,8 +53,7 @@ my $commit = 100;
|
|||
my $tagtolink;
|
||||
my $allowrelink = C4::Context->preference("LinkerRelink") // '';
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
my $result = GetOptions(
|
||||
my $result = GetOptions(
|
||||
'v|verbose' => \$verbose,
|
||||
't|test' => \$test_only,
|
||||
'l|link-report' => \$link_report,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
use Modern::Perl;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Log qw(cronlogaction);
|
||||
use Getopt::Long qw( GetOptions );
|
||||
use Pod::Usage qw( pod2usage );
|
||||
use Koha::Logger;
|
||||
|
|
@ -40,15 +39,12 @@ This script fixes any date fields in the database that have '0000-00-00' values
|
|||
my $verbose = 0;
|
||||
my $doit = 0;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
|
||||
GetOptions(
|
||||
'v|verbose' => \$verbose,
|
||||
'c|confirm' => \$doit,
|
||||
);
|
||||
|
||||
if ($doit) {
|
||||
cronlogaction( { action => 'Run', info => $command_line_options } );
|
||||
} else {
|
||||
warn "Running in dry-run mode, provide --confirm to apply the changes\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,14 +25,12 @@ use Modern::Perl;
|
|||
use Koha::Script;
|
||||
use C4::Context;
|
||||
use C4::AuthoritiesMarc qw( DelAuthority );
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Getopt::Long qw( GetOptions );
|
||||
|
||||
use Koha::SearchEngine::Search;
|
||||
|
||||
my @authtypes;
|
||||
my ( $confirm, $test, $want_help );
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
GetOptions(
|
||||
'aut|authtypecode:s' => \@authtypes,
|
||||
'c|confirm' => \$confirm,
|
||||
|
|
@ -45,8 +43,6 @@ if ( $want_help || !( $test || $confirm ) ) {
|
|||
exit 0;
|
||||
}
|
||||
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
if ($test) {
|
||||
print "*** Testing only, authorities will not be deleted. ***\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue