Cronjobs und Daemons

Koha is supported by a number of background tasks. These tasks can either be periodically executed tasks (cron jobs) or continuously running tasks called daemons.

Ein Cronjob ist ein Linuxbefehl für das automatische geplante Ausführen von Befehlen oder Skripten für sich wiederholende Aufgaben auf dem Server. Skripte, die per Cronjob ausgeführt werden, werden normalerweise verwendet um Dateien oder Datenbanken zu ändern; sie können allerdings auch andere Aufgaben ausführen, die keine Daten auf dem Server verändern, wie z.B. den Versand von Benachrichtigungen.

Ein Daemon ist ein Linuxbefehl das meistens bereits gestartet wird, wenn das System hochfährt und im Hintergrund läuft um eine Funktion zu erfüllen. Das von Koha verwendete Datenbankmanagementsystem (MySQL oder MariaDB) ist ein Daemon sowie auch der Webserver (normalerweise Apache).

Koha has many cron jobs in place that you can enable (search engine indexing, overdue notice generation, data cleanup and more), and a few daemons. This chapter will explain those for you.

Crontab-Beispiel

Ein Beispiel für einen Crontab für Koha finden Sie unter misc/cronjobs/crontab.example

Das Beispiel beeinhaltet Vorlagen für die am häufigsten genutzten Cronjobs.

Cronjobs

The locations in the documentation assume a development install where files are found in misc/ relative to the git root checkout. If you have installed using Debian packages or the standard install from source, you will want to look for files in /usr/share/koha/bin/.

Other locations are possible with other installation methods. You can perform a simple find search if they are not located in these directories.

Bemerkung

For anyone with shell access using Debian packages, the following command is an easy way to find files installed by a Debian package:

dpkg -L koha-common

This provides a comprehensive listing of the files installed by the koha-common package. You can then easily find the file from there.

Datensicherung

Tägliche Datensicherung

Skriptpfad: misc/cronjobs/backup.sh

Zweck: Erstellt ein tägliches Backup der Koha-Datenbank.

Vorschlag für Häufigkeit: täglich

Ausleihe

Liste der Vormerkungen

Skriptpfad: misc/cronjobs/holds/build_holds_queue.pl

Zweck: Aktualisiert und erstellt die Liste der Vormerkungen

Erforderlich für: Liste der Vormerkungen

Vorschlag für Häufigkeit: alle 1-4 Stunden

Beschreibung:

  • Damit dieser Report erzeugt wird, muss der ‚build_holds_queue‘-Cronjob eingerichtet sein. Dieser Cronjob ist ein Skript, das regelmäßig laufen sollte, wenn Ihre Bibliothek Vormerkungen auf nicht entliehene Exemplare erlaubt. Das Skript legt fest, welche Bibliothek das Exemplar für eine Vormerkung bereitstellen muss.

    Das Verhalten des Cronjobs wird beeinflusst durch die Systemparameter StaticHoldsQueueWeight und RandomizeHoldsQueueWeight.

    Wenn nicht alle Bibliotheken verfügbare Exemplare ausheben und bereitstellen, sollten Sie hier alle *teilnehmenden* Bibliotheken mit ihren Bibliothekskürzeln auflisten, getrennt mit Komma ( z.B. „MPL,CPL,SPL,BML“ usw. ).

    Als Voreinstellung versucht das System eine Vormerkung zunächst mit einem vorhandenen Exemplar in der gewählten Abholbibliothek zu erfüllen. Sind dort keine verfügbaren Exemplare vorhanden, verwendet das Script build_holds_queue.pl die in StaticHoldsQueueWeight definierte Bibliotheksliste um ein Exemplar zu finden. Wenn RandomizeHoldsQueueWeight ausgeschaltet ist (Voreinstellung), versucht das Script die Anforderung in der Reihenfolge zu erfüllen, in der die Bibliotheken im Systemparameter StaticHoldsQueueWeight eingetragen sind.

    Wenn Sie zum Beispiel ein System mit drei Bibliotheken unterschiedlicher Größen haben (small, medium, large ) und Sie die Last der Vormerkungen entsprechend verteilen wollen, können Sie bei StaticHoldsQueueWeight zum Beispiel „LRG,MED,SML“ definieren.

    Wenn Sie die Last der Vormerkungen gleichmäßig auf alle Bibliotheken verteilen wollen, schalten Sie den Systemparameter ‚RandomizeHoldsQueueWeight‘ ein. Auf diese Weise wird jedesmal, wenn die Liste generiert wird, die Reihenfolge der betroffenen Bibliotheken zufällig neu gemischt.

Abgelaufene Vormerkungen

Skriptpfad: misc/cronjobs/holds/cancel_expired_holds.pl

Does: cancels holds where the user has set an expiration date. If the library is using the ExpireReservesMaxPickUpDelay and ExpireReservesMaxPickUpDelayCharge preferences then this script will also cancel holds that have been sitting on the hold shelf for too long and will (if the library does) charge the patron for not picking up the hold.

Es ist möglich einen Stornierungsgrund mit dem Parameter –reason anzugeben. Verwenden Sie den Code für den Grund aus der Liste der normierten Werte für die Kategorie HOLD_CANCELLATION.

Vorschlag für Häufigkeit: täglich

Wiederaufnahme von Vormerkungen

Skriptpfad: misc/cronjobs/holds/auto_unsuspend_holds.pl

Does: checks to find holds that should no longer be suspended and removes the suspension if the AutoResumeSuspendedHolds preference is set to ‚allow‘. This puts the patron back in to the queue where they were when the hold was suspended.

Vorschlag für Häufigkeit: täglich

Gebühren

Skriptpfad: misc/cronjobs/fines.pl

Zweck: Berechnet und bucht Mahngebühren pro Exemplar auf dem Benutzerkonto. Die Gebührenberechnung erfolgt unter Verwendung der Gnadenfrist, des Gebühreninterfalls, der Mahngebühr und anderer Parameter aus den Ausleihkonditionen.

Required by: finesMode system preference

Vorschlag für Häufigkeit: nächtlich

Hinweis Wenn der Systemparameter „finesMode“ auf „Berechne und buche“ gesetzt ist, werden Gebühren auf den Benutzerkonten gebucht.

Hinweis An einem Schließtag werden keine Gebühren berechnet.

PARAMETER - -h|–help

  • Hilfe ausgeben

  • -l|–log

    • Ausgabe in eine Datei loggen (optional, wenn der Parameter -o angegeben wird)

  • -o|–out

    • Das Ausgabeverzeichnis für Logs (voreingestellt auf env oder /tmp, wenn das Verzeichnis nicht existiert)

  • -v|–verbose

    • Ausführliche Ausgabe

  • -m|–maxdays

    • Anzahl an Tagen in der Vergangenheit für die Überfälligkeiten bearbeitet werden sollen

    • Dies kann die Performanz verbessern, da die Anzahl der zu bearbeitenden Datensätze eingeschränkt wird. Eine Vorgehensweise wäre auf die Überfälligkeiten einzuschränken, die in den Ausleihkonditionen definierte maximale Höhe der Mahngebühren bereits sicher erreicht haben.

Statische Gebühren

Skriptpfad: misc/cronjobs/staticfines.pl

Zweck: Erhebt eine einzelne statische Gebühr für alle Überfälligkeiten, die ein Benutzer hat. Die Höhe der Gebühr wird entweder über einen Kommandozeilenparameter per Benutzertyp oder oder die Ausleihkonditionen für das am längsten überfällige und noch entliehene Exemplar berechnet. Sobald die Gebühr berechnet wurde, ist sie statisch: Es werden keine weiteren Gebühren erhoben, bis die vorhandene Gebühr vollständig bezahlt wurde.

Vorschlag für Häufigkeit: nächtlich

Hinweis Wenn der Systemparameter „finesMode“ auf „Berechne und buche“ gesetzt ist, werden Gebühren auf den Benutzerkonten gebucht.

Hinweis An einem Schließtag werden keine Gebühren berechnet.

Batch writeoff charges

Script path: misc/cronjobs/writeoff_debts.pl

Does: writes off outstanding charges in patron accounts.

PARAMETER

Bemerkung

The options to select the debt records to writeoff are cumulative. For example, supplying both --added_before and --type specifies that the accountline must meet both conditions to be selected for writeoff.

Bemerkung

You must use at least one of the filtering options for the script to run. This is to prevent an accidental ‚writeoff all‘ operation.

  • -h | --help

    • Displays help message.

  • -v | --verbose

    • Verbose output.

  • --added-before

    • Write off charges added before the specified date.

    • Dates should be in ISO format, e.g., 2013-07-19, and can be generated with date -d '-3 month' --iso-8601.

  • --added-after

    • Write off charges added after the specified date.

    • Dates should be in ISO format, e.g., 2013-07-19, and can be generated with date -d '-3 month' --iso-8601.

    Version

    The --added-after parameter was added in Koha version 23.11.

  • --category-code

    • Write off charges of patrons belonging to the specified categories.

    • Repeatable.

    Version

    The --category-code parameter was added in Koha version 23.11.

  • --type

  • --file

    • Write off charges passed as one accountlines_id per line in this file.

    • If other criteria are defined it will only writeoff those in the file that match those criteria.

  • --confirm

    • This parameter is needed to actually writeoff the charges.

    • Running the script without this parameter will only output which charges would have been written off.

BEISPIELE ZUR VERWENDUNG

writeoff_debts.pl --added_after 2023-06-20 --confirm

Will write off charges added after 2023-06-20.

writeoff_debts.pl --added_before `date -d '-3 month' --iso-8601` --category-code K --confirm

Will write off charges older than 3 months for patrons in the ‚K‘ category.

Lange Überfälligkeiten

Skriptpfad: misc/cronjobs/longoverdue.pl

Zweck: Erlaubt es Fristen zu definieren, nach denen Exemplare auf verschiedene Verloren-Status gesetzt werden und nach denen auch optional eine Buchersatzgebühr berechnet werden kann.

Vorschlag für Häufigkeit: nächtlich

Hinweis

Staff can control some of the parameters for the longoverdue cron job with the DefaultLongOverdueLostValue and DefaultLongOverdueChargeValue preferences.

Aktualisierung der Ausleihzahlen

Skriptpfad: misc/cronjobs/update_totalissues.pl

Zweck: Aktualisiert das Feld biblioitems.totalissues in der Datenbank mit den zuletzt erfolgten Ausleihen, basierend auf den Daten der Ausleihhistorie.

Vorschlag für Häufigkeit: nächtlich

Warnung

Wenn die Zeit Ihres Datenbankservers nicht mit der Zeit des Koha-Servers übereinstimmt, müssen Sie dies berücksichtigen und ggf. das den Parameter –since statt –interval für das inkrementelle Update verwenden.

Hinweis

This cronjob can be used if there is a performance concern. Otherwise, use the UpdateTotalIssuesOnCirc System preference.

Benutzerdatei für Offline-Verbuchung erzeugen

Skriptpfad: misc/cronjobs/create_koc_db.pl

Zweck: Generiert die Datei borrowers.db zur Verwendugn mit der integrierten Koha Offlie-Verbuchung

Vorschlag für Häufigkeit: wöchentlich

Automatische Verlängerung

Skript unter: misc/cronjobs/automatic_renewals.pl

Zweck: Führt die automatischen Verlängerungen aus, wenn diese über die Ausleihkonditionen erlaubt sind.

Vorschlag für Häufigkeit: nächtlich

Wichtig

Um diesen Cronjob auszuführen, müssen Sie den Parameter –confirm verwenden, da sonst nur der Testmodus ausgeführt wird

PARAMETER - -h|–help

  • Hilfe ausgeben

  • –send-notices

    • Verschickt die Benachrichtigung AUTO_RENEWALS an die Benutzer, wenn die automatische Verlängerung ausgeführt wurde

  • -v|–verbose

    • Ausführliche Ausgabe

  • -c|–confirm

    • ohne diesen Parameter werden keine Änderungen vorgenommen, das Skript wird nur im Testmodus ausgeführt

    • ohne diesen Parameter wird das Skript mit ausführlicher Ausgabe ausgeführt

Automatische Rückgabe

Skriptpfad: misc/cronjobs/automatic_checkin.pl

Zweck: Gibt Exemplare automatisch nach Ablauf der Leihfrist zurück. Konfiguriert wird dies auf Ebene der Medientypen.

Vorschlag für Häufigkeit: nächtlich

Rückrufe

Abgelaufene Rückrufe

Skriptpfad: misc/cronjobs/recalls/expire_recalls.pl

Zweck: Kennzeichnet Rückrufe als abgelaufen,

  • die nicht erfüllt wurden und das Ablaufdatum erreicht haben

  • recalls that have been awaiting pickup longer than the pickup period in the circulation rules or the period set in the RecallsMaxPickUpDelay system preference

Vorschlag für Häufigkeit: nächtlich

Überfällige Rückrufe

Skriptpfad: misc/cronjobs/recalls/overdue_recalls.pl

Zweck: Setzt einen zurückgerufenes Exemplar auf überfällig, wenn es nicht bis zum angepassten Fälligkeitsdatum zurückgegeben wurde.

Vorschlag für Häufigkeit: nächtlich

Benutzer

Stapellöschung von Benutzern

Skriptpfad: misc/cronjobs/delete_patrons.pl

Zweck: Löscht Benutzerdatensätze auf Basis des letzten Ausleihdatums, des Ablaufdatums, der letzten Aktivität, dem Benutzertyp oder der Bibliothek.

Hinweis

Daten sollten im ISO-Format angegeben werden, z.B. 2021-07-19 und können auch mit date -d ‚-3 month‘ „+%Y-%m-%d“ kalkuliert werden.

Wichtig

Die Optionen um Benutzerdatensätze auszuwählen und zu löschen sind kumultativ. Wenn z.B. sowohl –expired_before als auch –library angegeben werden, muss der Benutzerdatensatz beide Kriterien erfüllen um gelöscht zu werden.

PARAMETER

  • –not_borrowerd_since Lösche Benutzer, die seit diesem Daten nichts mehr entliehen haben.

    Warnung

    Patrons who have all their old checkouts anonymized will have an empty circulation history and be deleted if this option is used. Anonymization can happen because the patron has borrowers.privacy = 2, through cronjobs doing anonymization or by the patron choosing to anonymize their history in the OPAC.

  • –expired_before Lösche Benutzer, deren Konto vor diesem Datum abgelaufen ist.

  • –last_seen Delete patrons who have not been connected since this date. The system preference TrackLastPatronActivity must be enabled to use this option.

  • –category_code Lösche Benutzer mit diesem Benutzertyp.

  • –library Lösche Benutzer mit dieser Heimatbibliothek.

  • -c|–confirm Dieser Parameter muss angegeben werden, damit das Skript tatsächlich Benutzer löscht. Wenn er nicht angegeben wird, erfolgt nur eine Ausgabe der Benutzer, die gelöscht werden würden.

  • -v|–verbose Ausführliche Ausgabe.

Benutzerdaten anonymisieren

Skriptpfad: misc/cronjobs/batch_anonymise.pl

Zweck: Entfernt die borrowernumber (interne Benutzernummer) aus der Ausleihhistorie, so dass die statistischen Daten erhalten bleiben, aber die Benutzerzuordnung aus Datenschutzgründen nicht mehr möglich ist.

Benutzertypen aktualisieren

Skriptpfad: misc/cronjobs/update_patrons_category.pl

Zweck: Aktualisiert den Benutzertyp von Benutzern, welche die angegebenen Kriterien erfüllen auf einen angegebenen Benutzertyp. Dies kann verwendet werden um die Konten von Kindern/Jugendlichen auf Benutzertypen für Erwachsene zu aktualisieren, wenn das für den Benutzertyp definierte Höchstalter erreicht wird.

Dieses Skript ersetzt j2a.pl.

Vorschlag für Häufigkeit: nächtlich

BESCHREIBUNG

Dieses Skript wird dazu verwendet den Benutzertyp von Benutzern anhand der als Kommandozeilenparameter definierten Kriterien zu verändern.

PARAMETER

  • –too_old Aktualisiere, wenn der Benutzer über dem Höchstalter für seinen aktuellen Benutzertyp liegt

  • –too_young Aktualisiere, wenn der Benutzer unter dem Mindestalter für seinen aktuellen Benutzertyp liegt

  • –fo=X|–fineover=X Aktualisiere, wenn die Gesamtsumme an Gebühren auf dem Benutzerkonto über X liegt.

  • –fu=X|–fineunder=X Aktualisiere, wenn die Gesamtsumme an Gebühren auf dem Benutzerkonto unter X liegt.

  • –rb=date|regbefore=date Aktualisiere, wenn das Anmeldedatum des Benutzers vor dem angegebenen Datum liegt.

  • –ra=date|regafter=date Aktualisiere, wenn das Anmeldedatum des Benutzers nach dem angegebenen Datum liegt.

  • -d –field name=value Aktualisiere, wenn die Bedingung erfüllt ist. <name> muss durch eine Spalte in der Tabelle borrowers ersetzt werden. Die Bedingung ist erfüllt, wenn der Inhalt des Felds <value> entspricht.

  • –where <conditions> Aktualisiere, wenn die <conditions> (Bedingungen) in SQL erfüllt sind.

  • -v|–verbose Ausführliche Ausgabe: Ohne diesen Parameter werden nur fatale Fehler ausgegeben.

  • -c|–confirm Schreibt die Änderungen in die Datenbank. Ohne diesen Parameter im Kommando werden keinerlei Änderungen gemacht.

  • -b|–branch <branchcode> Aktualisiere, wenn die Heimatbibliothek des Benutzers dem angegebenen <branchcode> (Bibliothekskürzel) entspricht.

  • -f|–form <categorycode> Aktualisiere, wenn der Benutzer aktuell diesen Benutzertyp hat.

  • -t|–to <categorycode> Aktualisiere die Benutzer, welche die Kriterien erfüllen, zu diesem Benutzertyp.

BEISPIELE ZUR VERWENDUNG

„update_patrons_category.pl“

„update_patrons_category.pl“ -b=<branchcode> -f=<categorycode> -t=<categorycode> (Bearbeitet eine Bibliothek und aktualisiert die Benutzertypen vom ersten auf den zweiten angegebenen Benutzertyp)

„update_patrons_category.pl“ -f=<categorycode> -t=<categorycode> -v -n (Bearbeitet alle Bibliotheken, zeigt alle Ausgaben und gibt die Benutzer, die geändert wurden, aus. Führt keine Änderungen in der Datenbank durch)

Benachrichtigungseinstellungen aktualisieren

Skriptpfad: misc/maintenance/borrowers-force-messaging-defaults.pl

Zweck: Akutalisiert die Benachrichtigungseinstellungen von Benutzer*innen auf die Voreinstellungen des jeweiligen Benutzertyps

Benachrichtigungseinstellungen werden automatisch gesetzt, wenn neue Konten angelegt durchgeführt wird. Wenn Benutzer*innen hingegen durch direkten Import in die Datenbank angelegt werden, dann werden die Benachrichtigungseinstellungen nicht gesetzt.

Es gibt keine empfohlene Häufigkeit. Dieses Werkzeug ist dazu gedacht, dann verwendet zu werden, wenn es benötigt wird, obwohl Sie es auch Ihrem Crontab hinzufügen können, wenn Sie regelmäßig Benutzer*innen direkt in die Datenbank importieren (z.B. durch Dritte).

BESCHREIBUNG

If the EnhancedMessagingPreferences system preference is enabled after borrowers have been created in the DB, those borrowers won’t have messaging transport preferences default values as defined for their borrower category. So you would have to modify each borrower one by one if you would like to send them ‚Hold Filled‘ notice for example.

Dieses Skript erstellt/überschreibt die Benachrichtigungseinstellungen für alle Benutzer*innen und setzt sie auf die Standardeinstellunen für ihren Benutzertyp (außer wenn die Optionen -not-expired oder -no-overwrite gesetzt sind, um nur einen Teil zu aktualisieren).

PARAMETER

  • --help

    • Display help message.

  • --doit

    • Aktualisiere die Benutzerdaten. Das Skript nimmt ohne diese Option keine Änderungen an den Benachrichtigungseinstellungen vor. Es werden nur die Benutzer*innen ausgegeben, die aktualisiert worden wären.

  • --not-expired

    • Aktualisiere nur aktive Konten (die noch nicht abgelaufen sind).

  • --no-overwrite

    • Aktualisiert nur Konten, bei denen keine Benachrichtigungseinstellungen vorgenommen wurden. Diese Option übergeht alle Benutzer*innen, die bereits Einstellungen vorgenommen haben.

  • --category

    • Aktualisiert nur die Benutzer*innen des angegebenen Benutzertyps.

    Warnung

    Diese Option ist nicht wiederholbar.

    Zum Beispiel:

    borrowers-force-messaging-defaults.pl --doit --category PT --category B
    

    aktualisiert nur die Konten des Benutzertyps B (des letzten angegebenen Benutzertyps).

  • --library

    • Will only update patrons whose home library matches the given branchcode.

    Version

    The --library parameter was added in Koha version 23.11.

  • --message-name

    • Will only update preferences for the specific message.

    • The list of values can be found in installer/data/mysql/mandatory/sample_notices_message_attributes.sql, in message_attributes.message_name in the database, or in the notices and slips tool.

    Version

    The --message-name parameter was added in Koha version 23.11.

  • --since

    • Aktualisiert nur Konten, die nach dem angegebenen Datum angelegt wurden.

    Bemerkung

    Diese Option kann spezifische oder relative Daten verwenden.

    Zum Beispiel:

    borrowers-force-messaging-defaults.pl --doit --since "2022-07-12"
    

    aktualisiert nur Konten, die nach dem 12. Juli 2022 angelegt wurden.

    Und:

    borrowers-force-messaging-defaults.pl --doit --since `date -d "1 day ago" '+%Y-%m-%d'
    

    aktualisiert nur Konten, die seit gestern angelegt wurden.

BEISPIELE ZUR VERWENDUNG

borrowers-force-messaging-defaults.pl --doit

Aktualisiert alle Konten mit den Standardbenachrichtigungseinstellungen für den jeweiligen Benutzertyp.

borrowers-force-messaging-defaults.pl --doit --not-expired

Aktualisiert alle noch nicht abgelaufenen Konten mit den vordefinierten Benachrichtigungseinstellungen für den jeweiligen Benutzertyp.

borrowers-force-messaging-defaults.pl --doit --category PT

Aktualisiert alle Konten des Benutzertyps PT mit den vordefinierten Benachrichtigungseinstellungen für diesen Benutzertyp.

borrowers-force-messaging-defaults.pl --doit --no-overwrite --since "2022-03-01"

Aktualisiert Konten, bei denen noch keine Einstellungen für die Benachrichtigungen vorgenommen wurden und die nach dem 1. März eingeschrieben wurden.

borrowers-force-messaging-defaults.pl --doit --no-overwrite --since `date -d "1 day ago" '+%Y-%m-%d'

Updates patrons who do not have any messaging preferences set and who are enrolled since yesterday.

borrowers-force-messaging-defaults.pl --doit --library CPL

Updates patrons whose home library is CPL.

borrowers-force-messaging-defaults.pl --doit --message-name Item_due

Updates preferences for the „Item due“ message only.

Benachrichtigungen

Warteschlange für Benachrichtigungen

Skriptpfad: misc/cronjobs/process_message_queue.pl

Does: processes the message queue to send outgoing emails and SMS messages to patrons. Messages are queued in the message queue by other scripts, such as advance_notices.pl, overdue_notices.pl, and holds_reminder.pl.

Bemerkung

Requires that EnhancedMessagingPreferences be set to ‚Allow‘.

Vorschlag für Häufigkeit: alle 1-4 Stunden

BESCHREIBUNG

This script processes the message queue in the message_queue database table. It sends out the messages in that queue and marks them appropriately to indicate success or failure. It is recommended that you run this regularly from cron, especially if you are using the advance_notices.pl script.

PARAMETER

  • -u | –username

    • Username of the mail account used to send the notices.

  • -p | –password

    • Password of mail account used to send the notices.

  • -t | –type

    • If supplied, only processes this type of message. Possible values are

      • email

      • sms

    • Repeatable

  • -c | –code

    • If supplied, only processes messages with this letter code.

    • Repeatable.

  • -l | –limit

    • The maximum number of messages to process for this run.

  • -m | –method

    • Authentication method required by SMTP server (see perldoc Sendmail.pm for supported authentication types).

  • -h | –help

    • Help message.

  • -v | –verbose

    • Provides verbose output to STDOUT.

  • -w | –where

    • Filter messages to send with additional conditions in a where clause.

Erinnerungsbenachrichtigung

Skriptpfad: misc/cronjobs/advance_notices.pl

Does: prepares „pre-due“ notices and „item due“ notices for patrons who request them prepares notices for patrons for items just due or coming due soon. requires EnhancedMessagingPreferences to be on

Vorschlag für Häufigkeit: nächtlich

Hinweis

Dieses Skript verschickt keine Benachrichtigungen. Es generiert diese und fügt Sie der Warteliste für Benachrichtigungen für den späteren Versand hinzu

Mahnung

Skriptpfad: misc/cronjobs/overdue_notices.pl

Zweck: Generiert Benachrichtigungen, um Benutzer über Ihre überfälligen Medien zu informieren (per E-Mail oder in Print)

Vorschlag für Häufigkeit: nächtlich

BESCHREIBUNG

This script creates and queues the overdue notices according to the parameters set in the overdue notice/status triggers tool.

PARAMETER

  • -n | –nomail

    • Do not send any email. Overdue notices that would have been sent to the patrons or to the admin are printed to standard out. CSV data (if the –csv flag is set) is written to standard out or to any CSV filename given.

  • –max <days>

    • Maximum days overdue to deal with.

    • Items overdue since longer than max days are assumed to be handled somewhere else, probably the longoverdues script. They are therefore ignored by this script. No notices are sent for them, and they are not added to any CSV files.

    • Defaults to 90 days.

  • –library <branchcode>

    • Only deal with overdues from this library.

    • Use the value in the branches.branchcode table.

    • This parameter is repeatable, to process overdues for a group of libraries.

  • –csv <filename>

    • Produces a CSV file.

    • If the -n (no mail) flag is set, this CSV data is sent to standard out or to a filename if provided. Otherwise, only overdues that could not be emailed are sent in CSV format to the admin.

  • –html <directory>

    • Output html to a file in the given directory.

    • If a patron does not have an email address or if the -n (no mail) flag is set, an HTML file is generated in the specified directory. This can be downloaded or further processed by library staff.

    • The file will be called notices-YYYY-MM-DD.html and placed in the directory specified.

  • –text <directory>

    • Output plain text to a file in the given directory.

    • If a patron does not have an email address or if the -n (no mail) flag is set, a text file is generated in the specified directory. This can be downloaded or further processed by library staff.

    • The file will be called notices-YYYY-MM-DD.txt and placed in the directory specified.

  • –itemscontent <list of fields>

    • Item information in templates.

    • Takes a comma separated list of fields that get substituted into templates in places of the <<items.content>> placeholder.

    • Defaults to due date,title,barcode,author

    • Other possible values come from fields in the biblio, items and issues tables.

  • –borcat <categorycode>

    • Prepare only overdue notices for specified patron categories.

    • This parameter is repeatable, to include several patron categories.

    • Use the value in categories.categorycode.

  • –borcatout <categorycode>

    • Do not prepare overdue notices for specified patron categories.

    • This parameter is repeatable, to exclude several patron categories.

    • Use the value in categories.categorycode.

    • t | –triggered

    • This option causes a notice to be generated if and only if an item is overdue by the number of days defined in the overdue notice trigger.

    • By default, a notice is sent each time the script runs, which is suitable for less frequent run cron script, but requires syncing notice triggers with the cron schedule to ensure proper behavior.

    • Add the –triggered option for daily cron, at the risk of no notice being generated if the cron fails to run on time.

  • –test

    • This option makes the script run in test mode.

    • In test mode, the script won’t make any changes on the DB. This is useful for debugging configuration.

  • –list-all

    • By default, <<items.content>> lists only those items that fall in the range of the currently processing notice.

    • Choose –list-all to include all overdue items in the list (limited by the –max setting).

  • –date <yyyy-mm-dd>

    • Emulate overdues run for this date.

  • –email <email_type>

    • Specify the type of email that will be used.

    • Can be ‚email‘, ‚emailpro‘ or ‚B_email‘.

    • This parameter is repeatable.

  • –frombranch

    • Organize and send overdue notices by home library (item-homebranch) or checkout library (item-issuebranch).

    • Defaults to item-issuebranch.

    Bemerkung

    This option is only used if the OverdueNoticeFrom system preference is set to ‚command-line option‘.

BEISPIELE ZUR VERWENDUNG

„overdue_notices.pl“

(All libraries are processed individually, and notices are prepared for all patrons with overdue items for whom we have email addresses. Messages for those patrons for whom we have no email address are sent in a single attachment to the library administrator’s email address, or to the address in the KohaAdminEmailAddress system preference.)

„overdue_notices.pl -n –csv /tmp/overdues.csv“

(Sends no email and populates /tmp/overdues.csv with information about all overdue items.)

„overdue_notices.pl –library MAIN max 14

(Prepares notices of overdues in the last 2 weeks for the MAIN library.)

Bemerkung

This script does not actually send the notices. It queues them in the message queue to be sent later or generates the HTML for printing.

Bemerkung

See also:

The misc/cronjobs/advance_notices.pl script allows you to send messages to patrons in advance of their items becoming due, or to alert them of items that have just become due.

The misc/cronjobs/process_message_queue.pl script sends the emails.

Holds reminder

Script path: misc/cronjobs/holds/holds_reminder.pl

Does: prepares reminder messages to be sent to patrons with waiting holds.

EnhancedMessagingPreferences must be set to ‚Allow‘, and patrons must have requested to have this notice (either through the Messaging tab in their online account in the OPAC, if EnhancedMessagingPreferencesOPAC is set to ‚Show‘, or in their messaging preferences in the staff interface).

Vorschlag für Häufigkeit: nächtlich

PARAMETER

  • -c | –confirm

    • Confirm flag, no email will be generated if this parameter is not set

  • -date <YYYY-MM-DD>

    • Send notices as would have been sent on a specific date

  • -days <number of days>

    • Number of days the hold has been waiting

    • If this parameter is not set, a notice will be sent to all patrons with waiting holds

    • Optional parameter

  • -holidays

    • Use the calendar exclude holidays from waiting days

  • -lettercode <lettercode>

    • Code of the predefined notice to use

    • Optional parameter, the default is HOLD_REMINDER

  • -library <branchcode>

    • Only deal with holds from this library

    • This flag is repeatable, to select notices for a group of libraries

  • -mtt <message_transport_type>

    • Type of messages to send (email, sms, print)

      • ‚email‘ and ‚sms‘ will fall back to ‚print‘ if the patron does not have an email address/phone number

    • The default is to use the patrons‘ messaging preferences for the ‚Hold reminder‘ notice

    • Passing this parameter will force send even if the patron has not chosen to receive hold reminder notices

    • This can be repeated to send various notices

  • -t | –triggered

    • Include only holds <days> days waiting, and not longer

    • If this is not set, the script will send messages for all holds waiting for equal to or more than <days> days

    • This option is useful if the cron is being run daily to avoid spamming the patrons

    • Optional parameter

  • -v

    • Verbose

    • Without this flag set, only fatal errors are reported.

    • If verbose is set but not confirm, a list of notices that would have been sent to the patrons are printed to standard out

  • -help

    • Brief help message

  • -man

    • Full documentation

    BEISPIELE

    Im folgenden Beispiele für die Ausführung dieses Skripts:

    ::

    holds_reminder.pl -library MAIN -days 14

    prepares notices of holds waiting for 2 weeks for the MAIN library

    ::

    holds_reminder.pl -lettercode LATE_HOLDS -library MAIN -days 14

prepares notices of holds waiting for 2 weeks for the MAIN library, using the ‚LATE_HOLDS‘ notice template

Talking Tech

Weitere Informationen darüber, wie Sie diesen Third Party Service konfigurieren, finden Sie im Kapitel über Talking Tech.

Benachrichtigungen versenden

Skriptpfad: misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl

Zweck: Generiert eine Spec C-Datei für ausgehende Benachrichtigungen für das Talking Tech i-tiva Telefonbenachrichtigungssystem.

Required by: TalkingTechItivaPhoneNotification

Vorschlag für Häufigkeit: nächtlich

Datei für eingehende Benachrichtigungen

Skriptpfad: misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl

Zweck: Vearbeitet die vom Talking Tech i-tive Telefonbenachrichtigungssystem erhaltenen Ergebnisdateien.

Required by: TalkingTechItivaPhoneNotification

Vorschlag für Häufigkeit: nächtlich

Benachrichtigung bei Kontoablauf

Skriptpfad: misc/cronjobs/membership_expiry.pl

Does: sends messages to warn patrons of their card expiration to the message queue cron. Can optionally renew patron accounts as well.

Requires: MembershipExpiryDaysNotice

Vorschlag für Häufigkeit: nächtlich

PARAMETER

  • --man

    • Prints the manual page and exits.

  • --help

    • Prints a brief help message and exits.

  • -v

    • Verbose.

    • Without this flag set, only fatal errors are reported.

  • -n

    • Do not send any email. Membership expiry notices that would have been sent to the patrons are printed to standard out.

  • -c

    • Confirm flag: Add this option. The script will only print a usage statement otherwise.

  • -branch

    • Optional branchcode to restrict the cronjob to that branch.

  • -before

    • Optional parameter to extend the selection with a number of days BEFORE the date set by the MembershipExpiryDaysNotice system preference.

  • -after

    • Optional parameter to extend the selection with a number of days AFTER the date set by the MembershipExpiryDaysNotice system preference.

    • For example, --before 100 --after 100 will notify patrons who have accounts expiring within a date range of 100 days before and 100 days after the MembershipExpiryDaysNotice system preference.

  • -where

    • Use this option to specify a condition. Add „me“ (alias) followed by the column name from the borrowers table.

    • For example:

      • --where="me.categorycode !='YA'" will notify patrons from categories other than ‚YA‘

      • --where="me.categorycode = 'S'" will notify patrons from the category ‚S‘ only

      • --where 'me.lastseen IS NOT NULL' will only notify patrons who have been seen.

  • -letter

    • Optional parameter to use another notice than the default: MEMBERSHIP_EXPIRY

  • -letter_renew

    • Optional parameter to use another renewal notice than the default: MEMBERSHIP_RENEWED

    Version

    The -letter_renew parameter was added in Koha version 23.11.

  • -active

    • Followed by a number of months.

    • Optional parameter to include active patrons only (active within passed number of months).

    • This parameter needs the TrackLastPatronActivityTriggers system preference.

    • Cannot be used with -inactive below, the two parameters are mutually exclusive

    Version

    The -active parameter was added in Koha version 23.11.

  • -inactive

    • Followed by a number of months.

    • Optional parameter to include inactive patrons only (inactive since passed number of months).

    • This parameter needs the TrackLastPatronActivityTriggers system preference.

    • Cannot be used with -active above, the two parameters are mutually exclusive

    Version

    The -inactive parameter was added in Koha version 23.11.

  • -renew

    • Optional parameter to automatically renew patrons instead of sending them an expiry notice.

    • They will be informed by a membership renewal notice (the default MEMBERSHIP_RENEWED or a custom one specified by -letter_renew)

    Version

    The -renew parameter was added in Koha version 23.11.

BEISPIELE ZUR VERWENDUNG

membership_expiry.pl -c

Will generate MEMBERSHIP_EXPIRY notices for patrons whose membership expires in the number of days set in MembershipExpiryDaysNotice.

membership_expiry.pl -c -renew

Will renew patrons whose membership expires in the number of days set in MembershipExpiryDaysNotice, and generate MEMBERSHIP_RENEWED notices for them.

membership_expiry.pl -c -renew -letter_renew PATRON_RENEWAL

Will renew patrons whose membership expires in the number of days set in MembershipExpiryDaysNotice, and generate the custom „PATRON_RENEWAL“ notices for them. A „PATRON_RENEWAL“ notice would have to have been created in the notices and slips tool beforehand.

membership\_expiry.pl -c -before 30

Will generate MEMBERSHIP_EXPIRY notices for patrons whose membership expires 30 days before the number of days set in MembershipExpiryDaysNotice.

membership_expiry.pl -c -renew -active 3

Will renew patrons whose membership expires in the number of days set in MembershipExpiryDaysNotice, and who have been active in the last three months („activity“ is determined by the TrackLastPatronActivityTriggers system preference), and generate MEMBERSHIP_RENEWED notices for them.

membership_expiry.pl -c -inactive 6 -letter INACTIVE_PATRON

Will generate the custom „INACTIVE_PATRON“ notices for patrons whose membership expires in the number of days set in MembershipExpiryDaysNotice, and who have been inactive for the last six months („activity“ is determined by the TrackLastPatronActivityTriggers system preference). An „INACTIVE_PATRON“ notice would have to have been created in the notices and slips tool beforehand.

In Bearbeitung/Einstellwagen

Skriptpfad: misc/cronjobs/cart_to_shelf.pl

Zweck: Aktualisiert alle Exemplare mit dem temporären Standort CART auf den permanenten Standort.

Required by: NewItemsDefaultLocation, UpdateItemLocationOnCheckin, and UpdateItemLocationOnCheckout system preferences.

Vorschlag für Häufigkeit: stündlich

Katalog

Webservice für den Stapelimport

Skriptpfad: misc/cronjobs/import_webservice_batch.pl

Zweck: Verarbeitet Importe des Typs „webservice“. Die Importe können alternativ auch aus der Oberfläche heraus verarbeitet werden.

Hinweis

Dieses Skript wird für die Integration mit OCLC Connexion verwendet

Connexion Import Daemon

Skriptpfad: misc/bin/connexion_import_daemon.pl

Zweck: Lauscht auf eingehende Anfragen von OCLC Connexion entsprechend der OCLC Gateway-Spezifikation. Es erwartet Anfragen mit MARCXML und Parameter für den Stapelimport aus einer Konfigurationsdatei und gibt diese an scv/import_bib weiter.

Hinweis

Dieses Skript wird für die Integration mit OCLC Connexion verwendet

Stapellöschung von Exemplaren

Skriptpfad: misc/cronjobs/delete_items.pl

Does: generates a query against the items database and deletes the items matching the criteria specified in the command line arguments. A lightweight batch deletion tool for items, suitable for running in a cron job.

PARAMETER

  • --help

    • Prints a brief help message.

  • --man

    • Prints the manual, with examples.

  • --verbose

    • Prints the „WHERE“ clause generated by the collected --where arguments, as well as items affected to Standard Out.

    • The item information printed is

      • itemnumber

      • barcode

      • title

  • --where

    • The following argument must be a syntactically valid SQL statement which is part of the WHERE clause querying the items table.

    • Repeatable. If there are multiple --where parameters, they will be joined by AND.

  • --commit

    • No items will be deleted unless this parameter is present.

BEISPIELE ZUR VERWENDUNG

delete_items.pl --where "items.withdrawn != 0" --where "items.withdrawn_on < $(date --date="13 month ago" --rfc-3339=date)" --commit

This will delete items where the withdrawn status is not zero AND where the withdrawn date is older than 13 months ago.

delete_items.pl --where "itemlost >= '1'" --where "itemlost <='4'" --where "itemlost_on < '2014-04-28'" --commit

This will delete items where the lost status is between 1 and 4 (inclusively) AND that were lost before 2014-04-28.

Schneller URL-Checker

Skriptpfad: misc/cronjobs/check-url-quick.pl

Bemerkung

Dieses Skript ersetzt das check-url.pl-Skript

Zweck: Prüft die URLs in den Titeldatensätzen: Scannt in der Voreinstellung alle URLs in 856$u der bibliografischen Datensätze und zeigt an, ob die Ressourcen erreichbar sind oder nicht.

PARAMETER

  • –host=http://default.tld Der Host, der verwendet wird, wenn eine URL keinen enthält bzw. nicht mit „http“ beginnt. Zum Beispiel: Wenn –host=mylib.com, dann wird wenn 856$u mit „img/image.jpg“ belegt ist, die geprüfte URL zu http://www.mylib.com/image.jpg ergänzt.

  • –tags Felder, die URLS im Unterfeld $u enthalten. Wenn dieser Parameter nicht angegeben wird, wird nur Feld 856 geprüft. Es können mehrere Felder angegeben werden, zum Beispiel:

    check-url-quick.pl –tags 310 410 856

  • –verbose|v Gibt sowohl die gültigen als auch die ungültigen URLs aus

  • –html Formatiert die Ausgabe in HTML. Das Ergebnis kann in eine Datei geschrieben werden, auf die über http zugegriffen werden kann. Auf diese Weise ist es möglich direkt auf den Titelsatz in der Katalogisierung zu verlinken. Mit diesem Parameter ist auch –host-intranet erforderlich.

  • –host-intranet=http://koha-pro.tld Host für den Link auf das Bearbeiten-Formular in der Katalogisierung in der Dienstoberfläche.

  • –timeout=10 Timeout für die Prüfung der URL. In der Voreinstellung 10 Sekunden.

  • –maxconn=1000 Anzahl gleichzeitiger HTTP-Anfragen. Voreinstellung: 200 Anfragen.

Datensätze über den Leader löschen

Skriptpfad: misc/cronjobs/delete_records_via_leader.pl

Zweck: Versucht alle MARC-Datensätze zu löschen, bei denen Leader Pos. 5 auf „d“ gesetzt ist.

PARAMETER

  • -c|–confirm Ohne diesen Parameter werden durch das Skript keine Änderungen gemacht

  • -v|–verbose Ausführliche Ausgabe

  • -t|–test Testmodus, es werden keine Datensätze gelöscht. Im Testmodus wird nicht ausgegeben, welche Titel/Exemplare tatsächlich gelöscht werden, sondern nur, bei welchen Datensätzen eine Löschung versucht wird.

  • -i|–delete-items Versuche anhängende Exemplare zu löschen, bevor der Titel gelöscht wird. Titel mit Exemplaren können nicht gelöscht werden.

Normdatensätze aktualisieren

Skriptpfad: misc/cronjobs/merge_authorities.pl

Zweck: Aktualisiert Titeldaten mit den Änderungen in den Normdaten

Hinweis

Der Name dieses Skripts ist etwas irreführend. Das Skript verschmilzt keine Normdatensätze, sondern verschmilzt Normdaten und Titeldaten. Bearbeitungen an den Normdaten werden in den verknüpften Titeln nachgezogen, wenn dieses Skript ausgeführt wird.

Required by: AuthorityMergeLimit system preference

Vorschlag für Häufigkeit: nächtlich

Verspätete Zeitschriftenhefte

Skriptpfad: misc/cronjobs/serialsUpdate.pl

Zweck: Prüft, ob es ein „verspätetes“ Heft für ein aktives Abonnement gibt und wenn dem so ist, wird es auf verspätet gesetzt und das nächste erwartete Heft vorhergesagt.

Vorschlag für Häufigkeit: nächtlich

Automatische Exemplaränderungen

Der Cronjob ist misc/cronjobs/automatic_item_modification_by_age.pl.

Does: updates items based on the list of rules set forth in the Automatic item modifications by age tool

Required by: Automatic item modifications by age

Vorschlag für Häufigkeit: nächtlich

Stock rotation

Script path: misc/cronjobs/stockrotation.pl

Does: moves items from one stock rotation stage to the next, if they are available for processing.

Each library will receive a report with „items of interest“ for them for today’s rota checks. Each item there will be an item that should, according to Koha, be located on the shelves of that branch, and which should be picked up and checked in.

Bemerkung

The email sent is based on the SR_SLIP template. It can be customized in the Notices and slips tool.

The item will either:

  • have been placed in transit to their new stage library;

  • have been placed in transit to be returned to their current stage library;

  • have just been added to a rota and will already be at the correct library;

Upon check-in,

  • items that need to be transferred elsewhere will be put in transit and a message will pop up requesting the item be sent to their new branch.

  • items that are already at the correct library will be checked in and no message will pop up.

Required by: Stock rotation tool

Vorschlag für Häufigkeit: nächtlich

PARAMETER

  • -a|–admin-email

    • An address to which email reports should also be sent

    • This is an additional email address to which all email reports will be sent, in addition to sending them to branch email addresses.

  • -b|–branchcode

    • Select branch to report on for ‚email‘ reports (default: all)

    • If the ‚email‘ report is selected, you can use the ‚branchcode‘ parameter to specify which branch’s report you would like to see.

    • The default is ‚all‘.

  • -x|–execute

    • Actually perform stockrotation housekeeping

    • By default, this script merely reports on the current status of the stock rotation subsystem. In order to actually place items in transit, the script must be run with the ‚execute‘ argument.

  • -r|–report

    • Select either ‚full‘ or ‚email‘

    • The ‚report‘ argument allows you to select the type of report that will be emitted.

    • The default is ‚full‘.

    • If the ‚email‘ report is selected, you can use the ‚branchcode‘ parameter to specify which branch’s report you would like to see.

  • -S|–Send-all

    • Send email reports even if the report body is empty

    • This argument causes even reports with an empty body to be sent.

  • -s|–send-email

    • Send reports by email

    • This argument causes the script to send reports by email.

  • -h|–help

    • Display the help message

OPAC

RSS-Feeds

Skriptpfad: misc/cronjobs/rss/rss.pl

Zweck: Erzeugt ein RSS-XML-Dokument für eine beliebige SQL-Anfrage (wird nicht für die RSS-Feeds der Suche verwendet). Weiteres unter: Benutzerdefinierte RSS-Feeds.

Vorschlag für Häufigkeit: stündlich

Normdatenbrowser

Cloud mit Schlagworten im OPAC (erfordert misc/cronjobs/build_browser_and_cloud.pl).

Zweck: Generiert die Inhalte für den Normdatenbrowser im OPAC

Required by: OpacBrowser system preference

Wichtig

Dieser Systemparameter und Cronjob sollten nur in französischsprachigen Systemen genutzt werden.

Schlagwort-/Verfasserwolken

Skriptpfad: misc/cronjobs/cloud-kw.pl

Zweck: Generiert eine Stichwortwolken in HTML aus den Zebra-Indizes. Die Datei misc/cronjobs/cloud-sample.conf enthält ein Beispiel zur Funktionsweise des Skripts.

Häufigkeit: Diese Art Skript kann z.B. einmal im Monat ausgeführt werden, da der generierte Inhalt sich nicht stark verändert.

Systemadministration

Servicebegrenzungen

Skriptpfad: misc/cronjobs/services_throttle.pl

Zweck: Setzt den Zähler für die Anfragen an den xISBN-Service zurück

Vorschlag für Häufigkeit: nächtlich

Datenbank aufräumen

Skriptpfad: misc/cronjobs/cleanup_database.pl

Zweck: Bereinigt Daten und Vorgänge in der Datenbank, z.B. Sessions, Zebra-Warteliste, Logs und zwischengespeicherte MARC-Dateien.

Siehe http://schema.koha-community.org/ für das Datenbankschema von Koha.

PARAMETER - –del-exp-selfreg

  • –del-unv-selfreg TAGE

    • –del-unv-selfreg TAGE Löscht alle nicht verifizierten Benutzerselbstregistrierungen in borrower_modifications, die älter als TAGE sind.

  • –deleted-catalog TAGE

    • Lösche alle Titelsätze, die vor mehr als x TAGEN gelöscht wurden, aus den Tabellen deletedbiblio, deletedbiblio_metadata, deletedbiblioitems und deleteditems.

  • –deleted-patrons TAGE

    • Lösche alle Benutzer, die vor mehr als x TAGEN gelöscht wurden, aus der Tabelle deletedborrowers.

  • –fees TAGE

    • Lösche alle Einträge in der Tabelle accountlines, bei denen der offene Betrag 0 oder NULL ist.

    • Im Fall von –fees, muss die Anzahl an TAGEN größer oder gleich 1 sein.

  • -h|–help

    • Hilfe ausgeben

  • –import TAGE

    • Lösche Einträge aus den Importtabellen, die älter als TAGE Tage sind.

    • Dies beinhaltet import_batches, import_biblios, import_items, import_record_matches und import_records.

    • In import_batches werden die Stapel, die als Ergebnis einer Z39.50-Suche angelegt wurden, mit dem Parameter –z3950 gelöscht.

    • Wenn nichts angegeben wird, werden 60 Tage verwendet.

  • --list-invites

    TAGE

    • Lösche (nicht angenommene) Einladungen zum Teilen von Listen aus der Tabelle virtualshelfshares, die bereits älter als TAGE Tage sind.

    • Wenn nichts angegeben wird, ist die Frist 14 Tage.

  • –logs TAGE

    • Löscht Einträge aus der Tabelle action_logs, die älter als TAGE Tage sind.

    • Wenn nichts angegeben wird, beträgt die voreingestellte Frist 180 Tage.

  • –log-modules

  • –preserve-logs

  • -m|–mail TAGE

    • Löscht Einträge aus der Tabelle message_queue die älter als TAGE Tage sind.

    • Wenn nichts angegeben wird, gilt eine Frist von 30 Tagen.

  • –merged

    • Löscht die bereits abgearbeiteten Einträge aus der Tabelle need_merge_authorities.

  • –oauth-tokens

    • Löscht abgelaufene OAuth2-Token.

  • –old-issues TAGE

    • Löscht Ausleihen, die bereits vor mehr als TAGE Tagen zurückgegeben wurden, aus der Tabelle old_issues.

  • –old-reserves TAGE

    • Löscht erfüllte und stornierte Vormerkungen, die bereits älter als TAGE Tage sind, aus der Tabelle old_reserves.

  • –restrictions TAGE

    • Purge patrons restrictions from the borrower_debarments table expired since more than DAYS days.

    • Wenn nichts angegeben wird, gilt eine Frist von 30 Tagen.

  • –return-claims

  • -all-restrictions

    • Löscht alle abgelaufenen Benutzersperren aus der Tabelle borrower_debarments.

  • –searchhistory TAGE

    • Löscht die Suchhistorien aus der Tabelle search_history, die älter als TAGE Tage sind.

    • Wenn nichts angegeben wird, werden 30 Tage verwendet.

  • –sessions

    • Leert die Tabelle sessions.

    • Wenn Sie dies verwenden, während Benutzer in Koha angemeldet sind, werden diese abgemeldet und müssen sich neu anmelden.

  • –sessdays TAGE

    • Löscht alle Sessions, die älter als TAGE Tage sind.

  • –statistics TAGE

    • Löscht alle Einträge aus der Tabelle statistics, die älter als TAGE Tage sind.

  • –temp-uploads

    • Delete temporary uploads from the uploaded_files table older than the number of days specified in the UploadPurgeTemporaryFilesDays system preference.

  • –temp-uploads-days TAGE

  • –transfer TAGE

    • Löscht alle abgeschlossenen Transporte, die länger als TAGE Tage zurückliegen aus der Tabelle branchtransfers.

  • –unique-holidays TAGE

    • Löscht alle einmaligen Schließtage aus der Tabelle special_holidays, die mehr als TAGE Tage zurückliegen.

  • –uploads-missing FLAG

    • Löscht die Einträge für Dateien, die nicht mehr im Dateisystem vorhanden sind, wenn das FLAG wahr ist, und zählt sie anderenfalls.

  • -v|–verbose

    • Ausführliche Ausgabe

  • –zebraqueue TAGE

    • Löscht alle Einträge in der Tabelle zebraqueue, die älter als TAGE Tage sind.

    • Wenn nichts angegeben wird, gilt eine Frist von 30 Tagen.

  • –z3950

    • Löscht alle Datensätze aus den Importtabellen, die durch Z39.50-Recherchen angelegt wurden.

    • Löscht alle weiteren Informationen zu Importen, siehe Parameter –import.

Bibliotheksstatistiken mit der Koha-Community teilen

Skriptpfad: misc/cronjobs/share_usage_with_koha_community.pl

Does: sends your info to the Hea website if you’re sharing information via the UsageStats feature

Häufigkeit: monatlich

Search for data inconsistencies

Script path: misc/maintenance/search_for_data_inconsistencies.pl

Does: reveals problems in data, such as

Some of these issues can cause problems in circulation or catalog search, so it’s important that they be corrected.

There is no suggested frequency. This is a tool to be used when needed.

Erwerbung

Unbearbeitete Vorschläge aufräumen

Skriptpfad: misc/cronjobs/purge_suggestions.pl

Zweck: Löscht alte Anschaffungsvorschläge.

PARAMETER

  • help|?

    Ausgabe der Hilfe

  • days

    Geben Sie das Alter der Anschaffungsvorschläge basierend auf dem „Bearbeitet am“-Datum an

    Bemerkung

    The system preference PurgeSuggestionsOlderThan can also be used to define the number of days used in the script. If using the system preference, don’t use the ‚days‘ parameter.

    Bemerkung

    Die Anzahl an Tagen basiert auf dem „Bearbeitungsdatum des Anschaffungsvorschlags.

  • confirm

    Dieser Parameter ist verpflichtend, damit das Skript ausgeführt wird.

E-Mail-Benachrichtigung für zu bearbeitende Anschaffungsvorschläge

Skriptpfad: misc/cronjobs/notice_unprocessed_suggestions.pl

Zweck: Generiert eine Benachrichtigung an den Besitzer des Haushaltskontos, dass Anschaffungsvorschläge auf Bearbeitung warten.

Bearbeitung von EDI-Nachrichten

Skriptpfad: misc/cronjobs/edi_cron.pl

Zweck: Sendet und empfängt EDI-Nachrichten

Häufigkeit: Alle 15 Minuten

Temporäre EDI-Dateien löschen

Skriptpfad: misc/cronjobs/remove_temporary_edifiles.pl

Zweck: Löscht temporäre EDI-Dateien, die älter als 5 Tage sind

E-resource management (ERM)

Harvesting cron job

Script path: /misc/cronjobs/erm_run_harvester.pl

Does: this script will run the SUSHI harvesting for any Active usage data providers set up in the E-resource management module.

Frequency: it is recommended you set it up to run at a regular interval (e.g., every month since providers usually produce statistics data monthly).

PARAMETER

  • --help or -h

    • Prints a help message

  • --begin-date

    • Set the start date for the harvest in yyyy-mm-dd format (e.g.: ‚2023-08-21‘)

  • --end-date

    • Set the end date for the harvest in yyyy-mm-dd format (e.g.: ‚2023-08-21‘)

  • --dry-run

    • Produces a run report, without actually doing anything permanent

  • --debug

    • Prints additional debugging information during the run

USAGE EXAMPLE

erm_run_harvester.pl --begin-date 2023-06-21 --debug

Will run the SUSHI harvest for Active usage data providers for the period starting 21 June 2023 to the present date (or to the date for which data is available). Additional debugging information about the way the harvest has run will be displayed.

Reports

Report ausführen

Script path: misc/cronjobs/runreport.pl

Does: runs pre-existing saved reports, optionally sends the results by email.

PARAMETER

  • -h | --help

    • Displays help message

  • -m | --man

    • Displays full documentation

    • Same as --help --verbose

  • -v | --verbose

    • Verbose output

    • Without this parameter, only fatal errors are reported

  • --format=s

    • Selects output format

    • Possible values:

      • text

      • html

      • csv

      • tsv

    • At the moment, ‚text‘ and ‚tsv‘ both produce tab-separated output

    • Defaults to ‚text‘

  • -e | --email

    • Send the output by email (implied by --to or --from)

  • --send_empty

    • Send the email even if the report returns no results

    Version

    The --send_empty parameter was added in Koha version 23.11.

  • -a | --attachment

    • Attach the report as a file

    • Cannot be used with html format

  • --username

    • Username to pass to the SMTP server for authentication

  • --password

    • Password to pass to the SMTP server for authentication

  • --method

    • The type of authentication, i.e. LOGIN, DIGEST-MD5, etc.

  • --to=s

    • E-mail address to which to send report results

    • If --email is specified, but --to is not, the address in KohaAdminEmailAddress is used

  • --from=s

    • E-mail address from which to send report

    • If --email is specified, but --from is not, the address in KohaAdminEmailAddress is used

  • --subject=s

    • Subject for the e-mail

  • --param=s

    • Pass value for the runtime parameter

    • Repeatable

    • Provide one --param per runtime parameter requested for the report. Report parameters are not combined as they are on the staff side, so you may need to repeat parameters.

  • --separator=s

    • Separator character

    • Only for csv format

    • Defaults to comma

  • --quote=s

    • Quote character

    • Only for csv format

    • Defaults to double quote

    • Empty string is allowed

    Version

    The --quote parameter was added in Koha version 23.11.

  • --store-results

  • --csv-header

    • Add column names as first line of csv output

ARGUMENTE

  • reportID

    • Report ID Number from saved_sql.id

    • Multiple ID’s may be specified

    • Mandatory

BEISPIELE ZUR VERWENDUNG

runreport.pl 1

Will output results from report 1 in the terminal (STDOUT).

runreport.pl 1 5

Will output results from reports 1 and 5 in the terminal (STDOUT).

runreport.pl --format html --to admin@myDNSname.org 1

Will send results from report 1 to admin@myDNSname.org in HTML format.

runreport.pl --format html --to admin@myDNSname.org --param CPL --param FICTION 1

Will send results from report 1 to admin@myDNSname.org in HTML format. ‚CPL‘ will be passed to the first runtime parameter, and ‚FICTION‘ will be passed to the second runtime parameter.

runreport.pl --store-results 1

Will save the report results in the saved_reports database table, and they will be available from the staff interface in Reports > Guided reports > Saved report.

Babelthèque

Report für Soziale Daten

Skriptpfad: misc/cronjobs/social_data/get_report_social_data.pl

Zweck: Lädt die Daten von Babelthèque als Ergänzung zu den OPAC-Datensätzen

Vorschlag für Häufigkeit: nächtlich

Babelthèque aktualisieren

Skriptpfad: misc/cronjobs/social_data/update_social_data.pl

Zweck: Aktualisiert die Titelsätze mit Daten von Babelthèque

Daemons

Daemons sind ständig laufende Tasks, welche den Betrieb von Koha unterstützen. Ihre Datenbank und der Webserver laufen als Daemons. Neuere Versionen von Koha starten zwei verschiedene Daemons für die Koha-Instanzen:

  • zebra - Dies ist Suchmaschinenserver

  • koha-indexer - dies ist der Daemon, der den Suchmaschinenindex mit neuen und geänderten Daten aktualisiert (Titel und Normdaten)

Diese Daemons werden durch das Skript etc/init.d/koha-common gestartet.

Daemon für den Zebra-Indexer

Skriptpfad: /usr/sbin/koha-indexer (gestartet durch /etc/init.d/koha-common)

Das Skript koha-indexer ruft rebuild_zebra.pl als Daemon auf. In diesem Modus läuft das Skript kontinuierlich und prüft die Datenbank alle 30 Sekunden auf neue oder geänderte Daten. Neue oder geänderte Datensätze werden dann an Zebra für die Indexierung weitergegeben, was nur etwa eine Sekunde dauert. Der Vorteil dieser Vorgehensweise ist ein ein Suchsystem, das schneller auf Änderungen reagiert als mit rebuild_zebra.pl als Cronjob.

Veraltete Skripte

Diese sollten nicht ohne weitere Änderungen ausgeführt werden:

Skriptpfad: misc/cronjobs/update_items.pl

Skriptpfad: misc/cronjobs/smsoverdues.pl

Skriptpfad: misc/cronjobs/notifyMailsOp.pl

Skriptpfad: misc/cronjobs/reservefix.pl

Skriptpfad: misc/cronjobs/zebraqueue_start.pl