Bug 9988: Add the cronjob and print an upgrade message
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 23 Feb 2017 11:23:36 +0000 (12:23 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 13 Apr 2017 12:53:47 +0000 (08:53 -0400)
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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
debian/koha-common.cron.daily
installer/data/mysql/atomicupdate/bug_9988c_cron.perl [new file with mode: 0644]
misc/cronjobs/crontab.example

index 92bfa58..0642e44 100644 (file)
@@ -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 (file)
index 0000000..bedef31
--- /dev/null
@@ -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";
+}
index e1b4c1f..8cb0b17 100644 (file)
@@ -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