diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 9195895890..744f241ffd 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -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__ diff --git a/misc/cronjobs/anonymize_last_borrowers.pl b/misc/cronjobs/anonymize_last_borrowers.pl index 46f1f94fc3..8386ba0ab9 100755 --- a/misc/cronjobs/anonymize_last_borrowers.pl +++ b/misc/cronjobs/anonymize_last_borrowers.pl @@ -31,7 +31,6 @@ use Koha::Script -cron; use C4::Context; use Koha::Patrons; use Getopt::Long; -use C4::Log; sub usage { print STDERR <anonymize_last_borrowers(); $verbose and print int($rows) . " item's last borrowers anonymized.\n"; diff --git a/misc/cronjobs/automatic_checkin.pl b/misc/cronjobs/automatic_checkin.pl index 2995d27eae..06f5d25024 100755 --- a/misc/cronjobs/automatic_checkin.pl +++ b/misc/cronjobs/automatic_checkin.pl @@ -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" } ); - diff --git a/misc/cronjobs/automatic_item_modification_by_age.pl b/misc/cronjobs/automatic_item_modification_by_age.pl index bea45ecd2e..d2d340ec17 100755 --- a/misc/cronjobs/automatic_item_modification_by_age.pl +++ b/misc/cronjobs/automatic_item_modification_by_age.pl @@ -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__ diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl index e28a189344..fa657b5947 100755 --- a/misc/cronjobs/automatic_renewals.pl +++ b/misc/cronjobs/automatic_renewals.pl @@ -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 diff --git a/misc/cronjobs/batch_anonymise.pl b/misc/cronjobs/batch_anonymise.pl index 7a48ca079b..c5e4a5795b 100755 --- a/misc/cronjobs/batch_anonymise.pl +++ b/misc/cronjobs/batch_anonymise.pl @@ -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); diff --git a/misc/cronjobs/build_browser_and_cloud.pl b/misc/cronjobs/build_browser_and_cloud.pl index 2e91db4715..637058ad97 100755 --- a/misc/cronjobs/build_browser_and_cloud.pl +++ b/misc/cronjobs/build_browser_and_cloud.pl @@ -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)", diff --git a/misc/cronjobs/cart_to_shelf.pl b/misc/cronjobs/cart_to_shelf.pl index cd2f18b68e..ce14a2deba 100755 --- a/misc/cronjobs/cart_to_shelf.pl +++ b/misc/cronjobs/cart_to_shelf.pl @@ -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" } ); diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index d3c50654bd..6ace767b3b 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -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 { diff --git a/misc/cronjobs/cloud-kw.pl b/misc/cronjobs/cloud-kw.pl index ee04397a22..102bb30671 100755 --- a/misc/cronjobs/cloud-kw.pl +++ b/misc/cronjobs/cloud-kw.pl @@ -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; diff --git a/misc/cronjobs/debar_patrons_with_fines.pl b/misc/cronjobs/debar_patrons_with_fines.pl index 3c02be0d93..44ba20e9ed 100755 --- a/misc/cronjobs/debar_patrons_with_fines.pl +++ b/misc/cronjobs/debar_patrons_with_fines.pl @@ -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"; diff --git a/misc/cronjobs/delete_patrons.pl b/misc/cronjobs/delete_patrons.pl index b6e872a43f..1948900d58 100755 --- a/misc/cronjobs/delete_patrons.pl +++ b/misc/cronjobs/delete_patrons.pl @@ -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 diff --git a/misc/cronjobs/edi_cron.pl b/misc/cronjobs/edi_cron.pl index 1d1072eaa1..c3d1954fe6 100755 --- a/misc/cronjobs/edi_cron.pl +++ b/misc/cronjobs/edi_cron.pl @@ -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; diff --git a/misc/cronjobs/erm_run_harvester.pl b/misc/cronjobs/erm_run_harvester.pl index 8f28e59547..3c7f1f6b29 100755 --- a/misc/cronjobs/erm_run_harvester.pl +++ b/misc/cronjobs/erm_run_harvester.pl @@ -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 $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) = @_; diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl index e3232f24dd..65ac8b2a31 100755 --- a/misc/cronjobs/fines.pl +++ b/misc/cronjobs/fines.pl @@ -50,7 +50,6 @@ my $log; my $maxdays; my $verify_issue; - GetOptions( 'h|help' => \$help, 'v|verbose' => \$verbose, diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index 620c0b14a7..255499a1d6 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -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) = @_; diff --git a/misc/cronjobs/harvest_oai.pl b/misc/cronjobs/harvest_oai.pl index 14b65adcfb..a4b413b243 100755 --- a/misc/cronjobs/harvest_oai.pl +++ b/misc/cronjobs/harvest_oai.pl @@ -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); diff --git a/misc/cronjobs/holds/auto_unsuspend_holds.pl b/misc/cronjobs/holds/auto_unsuspend_holds.pl index 529381b17c..82f8a227ac 100755 --- a/misc/cronjobs/holds/auto_unsuspend_holds.pl +++ b/misc/cronjobs/holds/auto_unsuspend_holds.pl @@ -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" } ); diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl index 416ab299ef..4936c5da69 100755 --- a/misc/cronjobs/holds/build_holds_queue.pl +++ b/misc/cronjobs/holds/build_holds_queue.pl @@ -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" } ); diff --git a/misc/cronjobs/holds/cancel_expired_holds.pl b/misc/cronjobs/holds/cancel_expired_holds.pl index 2daf92ecd3..390ca88f0d 100755 --- a/misc/cronjobs/holds/cancel_expired_holds.pl +++ b/misc/cronjobs/holds/cancel_expired_holds.pl @@ -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" } ); diff --git a/misc/cronjobs/holds/cancel_unfilled_holds.pl b/misc/cronjobs/holds/cancel_unfilled_holds.pl index 99961e8e99..7a9d850f29 100755 --- a/misc/cronjobs/holds/cancel_unfilled_holds.pl +++ b/misc/cronjobs/holds/cancel_unfilled_holds.pl @@ -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" } ); diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl index 33ccfb37c8..870f966a46 100755 --- a/misc/cronjobs/holds/holds_reminder.pl +++ b/misc/cronjobs/holds/holds_reminder.pl @@ -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" } ); diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index a6f7244ee5..53f0f3f231 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -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" } ); diff --git a/misc/cronjobs/marc_ordering_process.pl b/misc/cronjobs/marc_ordering_process.pl index 0e51cf7baf..070780f4d5 100755 --- a/misc/cronjobs/marc_ordering_process.pl +++ b/misc/cronjobs/marc_ordering_process.pl @@ -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" } ); diff --git a/misc/cronjobs/membership_expiry.pl b/misc/cronjobs/membership_expiry.pl index 1ea7cb0313..a27ac81c1e 100755 --- a/misc/cronjobs/membership_expiry.pl +++ b/misc/cronjobs/membership_expiry.pl @@ -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" } ); diff --git a/misc/cronjobs/merge_authorities.pl b/misc/cronjobs/merge_authorities.pl index 0ecb7a1623..67088ce1b5 100755 --- a/misc/cronjobs/merge_authorities.pl +++ b/misc/cronjobs/merge_authorities.pl @@ -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); diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index b2acceb334..3dfed6fac2 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -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" } ); diff --git a/misc/cronjobs/patron_emailer.pl b/misc/cronjobs/patron_emailer.pl index dd2da26187..a8be9a8ee2 100755 --- a/misc/cronjobs/patron_emailer.pl +++ b/misc/cronjobs/patron_emailer.pl @@ -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" } ); diff --git a/misc/cronjobs/plugins_nightly.pl b/misc/cronjobs/plugins_nightly.pl index 6c4d32f0d4..b9e80beca8 100755 --- a/misc/cronjobs/plugins_nightly.pl +++ b/misc/cronjobs/plugins_nightly.pl @@ -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 diff --git a/misc/cronjobs/process_message_queue.pl b/misc/cronjobs/process_message_queue.pl index fddf013c81..79ba573c55 100755 --- a/misc/cronjobs/process_message_queue.pl +++ b/misc/cronjobs/process_message_queue.pl @@ -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" } ); diff --git a/misc/cronjobs/purge_suggestions.pl b/misc/cronjobs/purge_suggestions.pl index 6869ae1d90..1569da0541 100755 --- a/misc/cronjobs/purge_suggestions.pl +++ b/misc/cronjobs/purge_suggestions.pl @@ -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" } ); diff --git a/misc/cronjobs/recalls/expire_recalls.pl b/misc/cronjobs/recalls/expire_recalls.pl index cec8f76537..1cf92bf8db 100755 --- a/misc/cronjobs/recalls/expire_recalls.pl +++ b/misc/cronjobs/recalls/expire_recalls.pl @@ -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" } ); diff --git a/misc/cronjobs/recalls/overdue_recalls.pl b/misc/cronjobs/recalls/overdue_recalls.pl index fce9eb6f5c..790e154011 100755 --- a/misc/cronjobs/recalls/overdue_recalls.pl +++ b/misc/cronjobs/recalls/overdue_recalls.pl @@ -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" } ); diff --git a/misc/cronjobs/reconcile_balances.pl b/misc/cronjobs/reconcile_balances.pl index 5f290a57ba..be6144170e 100755 --- a/misc/cronjobs/reconcile_balances.pl +++ b/misc/cronjobs/reconcile_balances.pl @@ -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__ diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl index b7f048cf87..dc8d2079aa 100755 --- a/misc/cronjobs/runreport.pl +++ b/misc/cronjobs/runreport.pl @@ -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" } ); diff --git a/misc/cronjobs/serialsUpdate.pl b/misc/cronjobs/serialsUpdate.pl index 25a4d93295..3417cd5cba 100755 --- a/misc/cronjobs/serialsUpdate.pl +++ b/misc/cronjobs/serialsUpdate.pl @@ -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" } ); diff --git a/misc/cronjobs/share_usage_with_koha_community.pl b/misc/cronjobs/share_usage_with_koha_community.pl index 9ff7a266ce..6739e9232c 100755 --- a/misc/cronjobs/share_usage_with_koha_community.pl +++ b/misc/cronjobs/share_usage_with_koha_community.pl @@ -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 diff --git a/misc/cronjobs/staticfines.pl b/misc/cronjobs/staticfines.pl index 966109b597..e7ea06c840 100755 --- a/misc/cronjobs/staticfines.pl +++ b/misc/cronjobs/staticfines.pl @@ -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" } ); diff --git a/misc/cronjobs/update_patrons_category.pl b/misc/cronjobs/update_patrons_category.pl index 6779b1bdcd..261494c57c 100755 --- a/misc/cronjobs/update_patrons_category.pl +++ b/misc/cronjobs/update_patrons_category.pl @@ -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, diff --git a/misc/cronjobs/update_totalissues.pl b/misc/cronjobs/update_totalissues.pl index d42ca21e23..6740098448 100755 --- a/misc/cronjobs/update_totalissues.pl +++ b/misc/cronjobs/update_totalissues.pl @@ -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 { diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl index a5006195c9..b307ce284f 100755 --- a/misc/cronjobs/writeoff_debts.pl +++ b/misc/cronjobs/writeoff_debts.pl @@ -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__ diff --git a/misc/import_patrons.pl b/misc/import_patrons.pl index 594d095a90..e257731e31 100755 --- a/misc/import_patrons.pl +++ b/misc/import_patrons.pl @@ -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 diff --git a/misc/link_bibs_to_authorities.pl b/misc/link_bibs_to_authorities.pl index 89f2e02e50..e707ba3141 100755 --- a/misc/link_bibs_to_authorities.pl +++ b/misc/link_bibs_to_authorities.pl @@ -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, diff --git a/misc/maintenance/fix_invalid_dates.pl b/misc/maintenance/fix_invalid_dates.pl index 64fefd0323..3d17790ac1 100755 --- a/misc/maintenance/fix_invalid_dates.pl +++ b/misc/maintenance/fix_invalid_dates.pl @@ -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"; } diff --git a/misc/migration_tools/remove_unused_authorities.pl b/misc/migration_tools/remove_unused_authorities.pl index 09f94e31d4..1b244fdcc3 100755 --- a/misc/migration_tools/remove_unused_authorities.pl +++ b/misc/migration_tools/remove_unused_authorities.pl @@ -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"; }