From cab15686b673295cf314949c457b56ab931394b8 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 23 Feb 2017 12:23:36 +0100 Subject: [PATCH] Bug 9988: Add the cronjob and print an upgrade message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Debian cron file and the misc crontab example are updated. A message is printed when upgrading. Note: At this moment the merge cron job is run once a day. This is imo a good starting point. The load for this job greatly depends on the value of pref AuthorityMergeLimit. Of course you can schedule the job more often, and if this need is felt more globally, we can adjust it later. Test plan: [1] Run the dbrev and see the message. [2] Read the changes to the cron files. Signed-off-by: Marcel de Rooy Signed-off-by: Marc VĂ©ron --- debian/koha-common.cron.daily | 1 + installer/data/mysql/atomicupdate/bug_9988c_cron.perl | 6 ++++++ misc/cronjobs/crontab.example | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_9988c_cron.perl diff --git a/debian/koha-common.cron.daily b/debian/koha-common.cron.daily index 92bfa58..0642e44 100644 --- a/debian/koha-common.cron.daily +++ b/debian/koha-common.cron.daily @@ -26,4 +26,5 @@ koha-foreach --enabled /usr/share/koha/bin/cronjobs/services_throttle.pl > /dev/ koha-foreach --enabled /usr/share/koha/bin/cronjobs/cleanup_database.pl --sessions --zebraqueue 10 --list-invites koha-foreach --enabled --noemail /usr/share/koha/bin/cronjobs/cleanup_database.pl --mail koha-foreach --enabled /usr/share/koha/bin/cronjobs/holds/auto_unsuspend_holds.pl > /dev/null 2>&1 +koha-foreach --enabled /usr/share/koha/bin/cronjobs/merge_authorities.pl -b koha-run-backups --days 2 --output /var/spool/koha diff --git a/installer/data/mysql/atomicupdate/bug_9988c_cron.perl b/installer/data/mysql/atomicupdate/bug_9988c_cron.perl new file mode 100644 index 0000000..bedef31 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_9988c_cron.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + print "IMPORTANT NOTE: If you are not using a regular Debian install, please verify that you no longer use misc/migration_tools/merge_authority.pl in your cron files AND add misc/cronjobs/merge_authorities.pl to cron now. This job is no longer optional! You need it to perform larger authority merges.\n"; + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 9988 - Cron alert)\n"; +} diff --git a/misc/cronjobs/crontab.example b/misc/cronjobs/crontab.example index e1b4c1f..8cb0b17 100644 --- a/misc/cronjobs/crontab.example +++ b/misc/cronjobs/crontab.example @@ -94,3 +94,6 @@ KOHA_CRON_PATH = /usr/share/koha/bin/cronjobs # share_usage_with_koha_community.pl every months 0 0 1 * * __KOHA_USER__ $KOHA_CRON_PATH/share_usage_with_koha_community.pl + +# run merge authorities +20 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/merge_authorities.pl -b -- 2.1.4