[Koha] error message in cronjob

Michael Kuhn mik at adminkuhn.ch
Sun Mar 14 03:17:46 NZDT 2021


Hi Isabel

You wrote:

 > After the latest update (version 20.11.03) I keep getting E-mails from
 > the system with an error from a cronjob:
 >
 > /etc/cron.daily/koha-common:
 >
 > Undefined subroutine &main::cronlogaction called at 
/usr/share/koha/bin/cronjobs/plugins_nightly.pl line 8.
 >
 > biblioteca: 255 status returned by 
"/usr/share/koha/bin/cronjobs/plugins_nightly.pl"
 >
 > In the Koha release notes I can see that this cronjob script is a new 
feature. Do I have to do something to make it work?

I have experienced the same after upgrading to Koha 20.11.03. The issue 
is described in Bug 27820 (plugins_nightly.pl script missing use):

* https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820

The issue will be solved in Koha 20.11.04 / Koha 21.05 but I have no 
plans to update to that revision/version. Thus I have just added the 
following lines in file 
"/usr/share/koha/bin/cronjobs/plugins_nightly.pl" and the issue is gone:

#!/usr/bin/perl

use Modern::Perl;

# ANFANG - Admin Kuhn
use Try::Tiny;
use C4::Context;
use C4::Log;
# ENDE - Admin Kuhn
use Koha::Logger;
# ANFANG - Admin Kuhn
use Koha::Plugins;
# ENDE - Admin Kuhn
use Koha::Script -cron;

cronlogaction();
...

Hope this helps.

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W www.adminkuhn.ch


More information about the Koha mailing list