Cron jobs and 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.

A cron job is a Linux command for scheduling a command or script on your server to complete repetitive tasks automatically. Scripts executed as a cron job are typically used to modify files or databases; however, they can perform other tasks that do not modify data on the server, like sending out email notifications.

A daemon is a Linux command that is typically started when the system is booted and runs in the background doing some function. The database used by Koha (either MySQL or MariaDB) is a daemon as is the web server (typically 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.

Exemple de crontab

Un exemple de crontab Koha se trouve dans misc/cronjobs/crontab.example.

The example includes sample boilerplate cron job entries for the most commonly-used cron jobs.

Cron jobs

The locations below assume a development install which puts the crons in misc/, if you have a standard install you may want to look in bin/ for these files if you cannot find them in misc/

Sauvegarde

Daily backup

Chemin du script : misc/cronjobs/backup.sh

Does: creates a daily backup of the Koha database.

Périodicité préconisée : chaque jour

Circulation

Holds queue

Chemin du script : misc/cronjobs/holds/build_holds_queue.pl

Does: updates holds queue report

Required by: Holds queue report

Périodicité préconisée : toutes les 15 mn

Description :

  • Ce script devrait être exécuté régulièrement si vos adhérents sont autorisés à placer des réservations sur des documents en rayon. Le script établit quelle bibliothèque doit prendre en charge la demande de réservation.

    It’s behavior is controlled by the system preferences StaticHoldsQueueWeight and RandomizeHoldsQueueWeight.

    Si vous ne voulez pas que toutes vos sites participent au processus de réservation en rayon, vous devez répertorier ici les sites qui *participent* au processus en saisissant leurs codes (branchcodes), séparés par des virgules (par ex. « MPL, CPL, SPL, BML », etc).

    La file d’attente des réservation sera générée par défaut de manière à ce que le système gère d’abord les réservations disponibles sur le site de retrait. S’il n’y a pas d’exemplaire disponible sur le site de retrait pour établir la liste des réservations, build_holds_queue.pl utilisera la liste des bibliothèques définie dans StaticHoldsQueueWeight. Si RandomizeHoldsQueueWeight est désactivé (il l’est par défaut), le script assignera les demandes de traitement dans l’ordre des autre sites indiqués dans la préférence système StaticHoldsQueueWeight.

    Par exemple si votre réseau compte trois sites de taille variable (petit, moyen et grand) et que vous souhaitez que la gestion des réservations soit effectuée par le plus grand site avant le plus petit, votre préférence système StaticHoldsQueueWeight ressemblera à quelquechose comme « LRG,MED,SML ».

    Si vous souhaitez répartir de manière équitable la réponse aux demandes de réservations au sein de votre réseau, activez RandomizeHoldsQueueWeight. Lorsque cette préférence système est activée, l’ordre dans lequel les sites devront répondre aux demandes de réservations pour une demande de document disponible sera généré de façon aléatoire à chaque réactualisation de la liste.

    Il est contre-indiqué de laisser StaticHoldsQueueWeight vide pour le moment. Cela force le script build_holds_queue à ignorer RandomizeHoldsQueueWeight, les demandes sont alors assignées aux sites non pas aléatoirement, mais par ordre alphabétique.

Expired holds

Chemin du script : 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.

It is possible to add a cancellation reason with the –reason parameter. Use the cancellation code from the HOLD_CANCELLATION authorized value category

Périodicité préconisée : chaque jour

Unsuspend holds

Chemin du script : 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.

Périodicité préconisée : chaque jour

Amendes

Chemin du fichier : misc/cronjobs/fines.pl

Does: calculates and charges (or increments) overdue fines per item to patron accounts. The fine calculation is done using the grace period, fine interval, fine amount and other parameters from the circulation and fines rules.

Requis par : finesMode system preference

Périodicité préconisée : chaque jour

Note If the Koha system preference “finesMode” is set to “production”, the fines are charged to the patron accounts. If set to “test”, the fines are calculated but not applied.

Note Fines will not be applied on a holiday.

PARAMETERS - -h|–help

  • get help message

  • -l|–log

    • log the output to a file (optional if the -o parameter is given)

  • -o|–out

    • output directory for logs (defaults to env or /tmp if the directory does not exist)

  • -v|–verbose

    • verbose mode

  • -m|–maxdays

    • how many days back of overdues to process

    • this can improve performance by simply the number of records that need to be processed. It can be safe to limit the overdues processed to those under X days overdues given that circulation policy often caps fines at a maximum after a number of days.

Static fines

Chemin du script : misc/cronjobs/staticfines.pl

Does: charges a single static fine for any/all overdues a patron currently has outstanding. The charge amount is either defined on the command line per borrower category or will use the circulation rules associated with the oldest overdue item the patron has currently checked out (for the first fine period only) Once charged, the fine is static: No new fines will be added until the existing fine is paid off in full.

Périodicité préconisée : chaque jour

Note If the Koha system preference “finesMode” is set to “production”, the fines are charged to the patron accounts. If set to “test”, the fines are calculated but not applied.

Note Les amendes ne sont pas appliquées pour un jour déclaré fermé.

Long overdues

Chemin du fichier : misc/cronjobs/fines.pl

Fonction: permet de spécifier des délais avant de changer le status d’un exemplaire, et optionnellement mettre une facture pour ceux-ci en utilisant le montant de remplacement listé dans la notice de l’exemplaire.

Périodicité préconisée : chaque jour

Note

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

Track total checkouts

Chemin du script : misc/cronjobs/update_totalissues.pl

Tâche effectuée : met à jour le champs biblioitems.totalissues dans la base de donnée avec le dernier décompte de prêts calculé à partir de l’historique des prêts de la table statistics.

Périodicité préconisée : chaque jour

Attention

Si le temps dans votre base de données ne concorde pas avec le temps sur votre serveur Koha, vous devrez prendre cela en compte, et probablement utiliser –since plutôt que –interval pour la mise a jour incrémentielle

Note

Ce cronjob peut être utilisé s’il y a un problème de performance. Sinon, utiliser la préférence système UpdateTotalIssuesOnCirc.

Generate patron file for offline circulation

Chemin du script : misc/cronjobs/create_koc_db.pl

Does: generates the borrowers.db file for use with the Koha offline circulation tool

Périodicité préconisée : chaque jour

Renouvellement automatique

Chemin du script : misc/cronjobs/automatic_renewals.pl

Does: renews items if you’re allowing automatic renewal with your circulation and fines rules.

Périodicité préconisée : chaque jour

Important

To run this properly, you must use the –confirm parameter, otherwise it will only run in test mode

PARAMETERS - -h|–help

  • get help message

  • –send-notices

    • sends the AUTO_RENEWALS notice to patrons if the automatic renewal has been done

  • -v|–verbose

    • verbose mode

  • -c|–confirm

    • without this parameter no changes will be made, the script will run in test mode

    • without this parameter, the script will default to verbose mode as well

Automatic checkin

Script path: misc/cronjobs/automatic_checkin.pl

Does: automatically checks in items after the loan period. This is set at the item type level.

Périodicité préconisée : chaque jour

Recalls

Expire recalls

Script path: misc/cronjobs/recalls/expire_recalls.pl

Does: automatically marks as expired recalls that

  • have been requested, but have not been fulfilled and are past their expiry date

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

Périodicité préconisée : chaque jour

Overdue recalls

Script path: misc/cronjobs/recalls/overdue_recalls.pl

Does: sets a recalled item as overdue if it hasn’t been returned by the adjusted due date

Périodicité préconisée : chaque jour

Utilisateurs

Batch delete patrons

Chemin du script : misc/cronjobs/delete_patrons.pl

Does: deletes patron records in batch based on date not borrowed since, expired before, last seen, category code, or library branch.

Note

Dates should be in ISO format, e.g., 2013-07-19, and can be generated with date -d “-3 month” « +%Y-%m-%d ».

Important

The options to select the patron records to delete are cumulative. For example, supplying both –expired_before and –library specifies that patron records must meet both conditions to be selected for deletion.

PARAMETERS

  • –not_borrowed_since Delete patrons who have not borrowed since this date.

  • –expired_before Delete patrons with an account expired before this date.

  • –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 Delete patrons who have this category code.

  • –library Delete patrons in this library.

  • -c|–confirm This flag must be provided in order for the script to actually delete patron records. If it is not supplied, the script will only report on the patron records it would have deleted.

  • -v|–verbose Verbose mode.

Anonymize patron data

Chemin du script : misc/cronjobs/batch_anonymise.pl

Does: removes borrowernumbers from circulation history so that the stats are kept, but the patron information is removed for privacy reasons.

Update patron categories

Script path: misc/cronjobs/update_patrons_category.pl

Does: Updates the patron category of patrons matching the given criteria to another specified patron category. This can be used to convert child patrons from a child patron category to an adult patron category when they reach the upper age limit defined in the patron category.

This script replaces the j2a.pl script.

Périodicité préconisée : chaque jour

DESCRIPTION

This script is designed to update patrons from one category to another using the criteria specified using command line arguments.

PARAMETERS

  • –too_old Update, if patron is over the upper age limit of their current patron category.

  • –too_young Update, if patron is below the minimum age limit of their patron category.

  • –fo=X|–fineover=X Update, if the total fine amount on the patron account is over X.

  • –fu=X|–fineunder=X Update, if the total fine amount on the patron account is below X.

  • –rb=date|regbefore=date Update, if the registration date of the patron is before the given date.

  • –ra=date|regafter=date Update, if the registration date of the patron is after the given date.

  • -d –field name=value Update, if the given condition is met. <name> has to be replaced by a column name of the borrowers table. The condition is met, if the the content of the field equals <value>.

  • –where <conditions> Update, if the SQL <where> clause is met.

  • -v|–verbose Verbose mode: Without this flag only fatal errors are reported.

  • -c|–confirm Commits the changes to the database. No changes will be made unless this argument is added to the command.

  • -b|–branch <branchcode> Update, if the home branch of the patron matches the <branchcode> given.

  • -f|–form <categorycode> Update, if the patron currently has this patron category.

  • -t|–to <categorycode> Update the patrons matching the criteria to this patron category.

EXEMPLES D’UTILISATION

« update_patrons_category.pl »

« update_patrons_category.pl » -b=<branchcode> -f=<categorycode> -t=<categorycode> -c » (Processes a single branch, and updates the patron categories from category to category)

« update_patrons_category.pl » -f=<categorycode> -t=<categorycode> -v » (Processes all branches, shows all messages, and reports the patrons who would be affected. Takes no action on the database)

Update patrons” messaging preferences

Script path: misc/maintenance/borrowers-force-messaging-defaults.pl

Does: updates patrons” messaging preferences to the default values set in the patron categories.

Messaging preferences defaults are automatically set when adding a new patron or when importing patrons with the patron import tool. However, if you import patrons directly in the database, these messaging preferences will not be set.

There is no suggested frequency. This is a tool to be used when needed, although if you regularly import patrons directly in the database (through a third-party, for example), you can add it to your crontab.

DESCRIPTION

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.

This script creates/overwrites messaging preferences for all borrowers and sets them to default values defined for the category they belong to (unless you use the options -not-expired or -no-overwrite to update a subset).

PARAMETERS

  • –doit

    Update the patrons. The script will not update patrons” messaging preferences without this option. It will only list the patrons who would have been updated.

  • –not-expired

    Only update patrons who are still active (whose files are not yet expired).

  • –no-overwrite

    Only update patrons without any messaging preferences. This option will skip patrons who have already set their preferences.

  • –category

    Only update patrons from the specified category.

    Avertissement

    This option cannot be repeated.

    For example:

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

    will only update patrons from category B (the last category specified).

  • –since

    Only update patrons enrolled since the specified date.

    Note

    This option can use specific or relative dates.

    For example:

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

    will only update patrons enrolled since July 12, 2022.

    And:

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

    will only update patrons enrolled since yesterday.

EXEMPLES D’UTILISATION

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

Updates all patrons to give them the default messaging preferences values from their respective category.

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

Updates all patrons whose memberships are not expired to give them the default messaging preferences values from their respective category.

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

Updates all patrons in the PT category to give them the default messaging preferences for that category.

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

Updates patrons who do not have any messaging preferences set and who are enrolled since March 1st, 2022.

Notifications

Message queue

Chemin du script : misc/cronjobs/process_message_queue.pl

Tâche effectuée : traite la file des messages (message queue) pour envoyer les courriels de prêts, de retours et de réservations disponibles ; pour envoyer les SMS et les courriels sortant aux adhérents. Nécessite d’activer EnhancedMessagingPreferences

Périodicité préconisée : toutes les 15 mn

Important

Item due and Advanced due notices are controlled by the advance_notices cron.

Advanced notice

Chemin du script : misc/cronjobs/advance_notices.pl

Tâche effectuée : prépare les notifications « pre-due » et « item due » pour les adhérents qui en ont fait la demande. Nécessite d’activer EnhancedMessagingPreferences

Périodicité préconisée : chaque jour

Note

This script does not actually send the notices. It queues them in the message queue for later

Overdue notice

Chemin du script : misc/cronjobs/overdue_notices.pl

Fonction : prépare les messages de retard pour les usagers (à la fois en version email et imprimée)

Périodicité préconisée : chaque jour

Note

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

Voir aussi

Le cron job misc/cronjobs/advance_notices.pl permet d’envoyer aux adhérents des messages pour les documents à retourner prochainement ou pour les documents à retourner dès à présent (messages de courtoisie).

Talking Tech

To learn more about setting up this third party product view the Talking Tech chapter.

Sending notices file

Chemin du script : misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl

Does: generates Spec C outbound notifications file for Talking Tech i-tiva phone notification system.

Requis par : TalkingTechItivaPhoneNotification

Périodicité préconisée : chaque jour

Receiving notices file

Chemin du script : misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl

Does: processes received results files for Talking Tech i-tiva phone notification system.

Requis par : TalkingTechItivaPhoneNotification

Périodicité préconisée : chaque jour

Notify patrons of expiration

Chemin du script : misc/cronjobs/membership_expiry.pl

Does: sends messages to warn patrons of their card expiration to the message queue cron.

Requiert : MembershipExpiryDaysNotice

Périodicité: chaque soir

In processing/book cart

Chemin du script : misc/cronjobs/cart_to_shelf.pl

Does: updates all items with a location of CART to the item’s permanent location.

Required by: NewItemsDefaultLocation, and UpdateItemLocationOnCheckin system preferences

Périodicité préconisée : chaque jour

Catalogue

Import webservice batch

Chemin du script : misc/cronjobs/import_webservice_batch.pl

Does: processes import bach queues of type “webservice”. Batches can also be processed through the UI.

Note

Ce script est utilisé pour la connexion OCLC

Connexion import daemon

Chemin du script : misc/bin/connexion_import_daemon.pl

Does: listens for OCLC Connexion requests and is compliant with OCLC Gateway specification. It takes requests with MARC XML and import batch parameters from a configuration file and forwards it to svc/import_bib

Note

Ce script est utilisé pour la connexion OCLC

Batch item deletion

Chemin du script : 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.

PARAMETERS

  • –verbose Send the « WHERE » clause generated by the collected C<–where> arguments, as well as items affected to Standard Out.

  • –where The C<–where> option may called multiple times. The following argument must be a syntactically valid SQL statement which is part of the C<WHERE> clause querying the items table. These are joined by C<AND>.

  • –commit No items will be deleted unless the C<–commit> flag is present.

EXAMPLES

The following are examples of this script:

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

delete_items.pl –where « itemlost >= “1” » –where « itemlost <=”4” » –where « itemlost_on < “2014-04-28” » –commit

Check URL quick

Chemin du script : misc/cronjobs/check-url-quick.pl

Note

This script replaces the deprecated check-url.pl script

Does: checks URLs from biblio records; scans all URLs found by default in 856$u of bibliographic records and displays if resources are available or not.

PARAMETERS

  • –host=http://default.tld Server host used when URL doesn’t have one, i.e. doesn’t begin with “http:”. For example, if –host=mylib.com, then when 856$u contains “img/image.jpg”, the url checked is: http://www.mylib.com/image.jpg.

  • –tags Tags containing URLs in $u subfields. If not provided, 856 tag is checked. Multiple tags can be specified, for example:

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

  • –verbose|v Outputs both successful and failed URLs.

  • –html Formats output in HTML. The result can be redirected to a file accessible by http. This way, it’s possible to link directly to the bibliographic record in edit mode. With this parameter –host-intranet is required.

  • –host-intranet=http://koha-pro.tld Server host used to link to bibliographic record editing page in Koha intranet interface.

  • –timeout=10 Timeout for fetching URLs. By default 10 seconds.

  • –maxconn=1000 Number of simultaneous HTTP requests. By default 200 connections.

Delete records via leader

Chemin du script : misc/cronjobs/delete_records_via_leader.pl

Does: attempts to delete any MARC records where the leader character 5 equals “d”.

PARAMETERS

  • -c|–confirm Script will do nothing without this parameter

  • -v|–verbose Verbose mode

  • -t|–test Test mode, does not delete records. Test mode cannot determine if a record/item will be deleted successfully, it will only tell you what records and items the script will attempt to delete.

  • -i|–delete-items Try deleting items before deleting record. Records with items cannot be deleted.

Update authorities

Chemin du script : misc/cronjobs/merge_authorities.pl

Does: updates biblio data with changes to authorities records

Note

Le nom du script est trompeur. Ce script ne fusionne pas les autorités entre elles, mais à la place met à jour les données d’autorité dans les données bibliographiques liées. Les modifications faites dans une notice d’autorité seront appliquées dans les notices bibliographiques qui utilisent cette autorité lorsque ce script est lancé.

Required by: AuthorityMergeLimit system preference

Périodicité préconisée : chaque jour

Serials update

Chemin du fichier : misc/cronjobs/fines.pl

Tâche effectuée : vérifie s’il y a un numéro en retard dans les abonnements actifs, et s’il y en a, le déclare “en retard” et ajoute le numéro suivant comme “attendu”.

Périodicité préconisée : chaque jour

Mise à jour automatique d’exemplaire

Chemin du script : misc/cronjobs/automatic_item_modification_by_age.pl

Tâche effectuée : met à jour les exemplaires sur la base d’une liste de règles définies préalablement dans l’outil Modification automatique d’exemplaires en fonction de l’age

Nécessaire pour Modification automatique d’exemplaires en fonction de l’age

Périodicité préconisée : chaque nuit

OPAC

RSS feeds

Chemin du fichier : misc/cronjobs/fines.pl

Does: produces an RSS XML document for any SQL query (not used for search results RSS feed). Learn more.

Périodicité préconisée : chaque jour

Authorities browser

Chemin du script : misc/cronjobs/build_browser_and_cloud.pl

Does: generates content for authorities browse in OPAC

Requis par : OpacBrowser system preference

Important

Cette préférence et job de Cron devraient être seulement utilisés dans des systèmes Français.

Subject/author clouds

Chemin du fichier : misc/cronjobs/fines.pl

Does: generates HTML keywords clouds from Koha Zebra indexes. misc/cronjobs/cloud-sample.conf has a sample of how this script operates.

Fréquence: Ceci est le type de scripte qui s’active une fois par mois ou environ,et le contenu généré

System administration

Services throttle

Chemin du script : misc/cronjobs/services_throttle.pl

Tâche effectuée : Réinitialise le nombre de services xISBN

Périodicité préconisée : chaque jour

Clean up database

Chemin du script : misc/cronjobs/cleanup_database.pl

Does: truncates the sessions table, cleans out old zebraqueue entries, action logs and staged MARC files.

See http://schema.koha-community.org/ for the Koha database schema.

PARAMETERS - –del-exp-selfreg

  • –del-unv-selfreg DAYS

    • Delete all unverified self registrations in borrower_modifications older than DAYS.

  • –deleted-catalog DAYS

    • Purge bibliographic records deleted more than DAYS days ago from tables deletedbiblio, deletedbiblio_metadata, deletedbiblioitems and deleteditems.

  • –deleted-patrons DAYS

    • Purge patrons deleted more than DAYS days ago from the deletedborrowers table.

  • –fees DAYS

    • Purge entries in the accountlines table older than DAYS days, where the amountoutstanding is 0 or NULL.

    • In the case of –fees, DAYS must be greater than or equal to 1.

  • -h|–help

    • Get help message

  • –import DAYS

    • Purge entries from import tables older than DAYS days.

    • This includes import_batches, import_biblios, import_items, import_record_matches and import_records.

    • In import_batches, the batches that are the result of Z39.50 searches are removed with the –z3950 parameter.

    • Defaults to 60 days if no days specified.

  • --list-invites

    DAYS

    • Purge (unaccepted) list share invites from the virtualshelfshares table older than DAYS days

    • Defaults to 14 days if no days specified.

  • –logs DAYS

    • Purge entries from the action_logs table older than DAYS days.

    • Defaults to 180 days if no number of days specified.

  • –log-modules

  • –preserve-logs

  • -m|–mail DAYS

    • Purge entries from the message_queue table that are older than DAYS days.

    • Defaults to 30 days if no days specified.

  • –merged

    • Purge completed entries from the need_merge_authorities table.

  • –oauth-tokens

    • Delete expired OAuth2 tokens

  • –old-issues DAYS

    • Purge checkouts returned more than DAYS days ago from the old_issues table.

  • –old-reserves DAYS

    • Purge holds more than DAYS old from the old_reserves table.

  • –restrictions DAYS

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

    • Defaults to 30 days if no days specified.

  • –all-restrictions

    • Purge all expired patrons restrictions from the borrower_debarments table.

  • –searchhistory DAYS

    • Purge entries from the search_history table older than DAYS days.

    • Defaults to 30 days if no days specified

  • –sessions

    • Purge the sessions table.

    • If you use this while users are logged into Koha, they will have to reconnect.

  • –sessdays DAYS

    • Purge only sessions older than DAYS days.

  • –statistics DAYS

    • Purge entries from the statistics tables that are more than DAYS days old.

  • –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 DAYS

  • –transfers DAYS

    • Purge transfers completed more than DAYS days ago from the branchtransfers table.

  • –unique-holidays DAYS

    • Delete all unique holidays from the special_holidays table older than DAYS

  • –uploads-missing FLAG

    • Delete upload records for missing files when FLAG is true, count them otherwise

  • -v|–verbose

    • verbose mode

  • –zebraqueue DAYS

    • Purge completed zebraqueue entries older than DAYS days.

    • Defaults to 30 days if no days specified.

  • –z3950

    • Purge records from import tables that are the result of Z39.50 searches.

    • To purge all other import information, see the –import parameter above.

Share usage stats

Chemin du fichier : 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

Périodicité: chaque mois

Acquisitions

Nettoie les vieilles suggestions

Chemin du script : misc/cronjobs/purge_suggestions.pl

Does: removes old suggestions from the suggestion management area.

PARAMETERS

  • help|?

    Show help message

  • days

    Define the age of suggestions to be deleted, based on “managed on” date

    Note

    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.

    Note

    The number of days is based on the “managed on” date of the suggestion.

  • confirm

    This parameter is mandatory for the script to run.

Courriel de suggestions à traiter

Chemin du script : misc/cronjobs/notice_unprocessed_suggestions.pl

Does: generates a notice to the fund owner that there are suggestions in need of processing

EDI message processing

Chemin du script : misc/cronjobs/edi_cron.pl

Does: sends and received EDI messages

Périodicité préconisée : toutes les 15 minutes

Remove temporary EDI files

Chemin du script : misc/cronjobs/remove_temporary_edifiles.pl

Tâche effectuée : supprime les fichiers EDI temporaires vieux de plus de 5 jours

Bilans et statistiques

Run report

Chemin du script : misc/cronjobs/runreport.pl

Does: runs pre-existing saved reports

PARAMETERS

  • -v|–verbose Verbose output

  • –format=s Selects format. Choice of text, html, csv or tsv

  • -e|–email Whether or not to use e-mail (implied by –to or –from)

  • -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 send report to

  • –from=s E-mail address to send report from

  • –subject=s Subject for the e-mail

  • –store-results Store the result of the report

  • –csv-header Add column names as first line of csv output

ARGUMENTS

  • reportID Report ID Number from saved_sql.id, multiple ID’s may be specified

Social data

Get report social data

Script path: misc/cronjobs/social_data/get_report_social_data.pl

Does: downloads data from Babelthèque to add to OPAC records

Périodicité préconisée : chaque jour

Update social data

Script path: misc/cronjobs/social_data/update_social_data.pl

Does: updates OPAC records with Babelthèque social data

Daemons

Daemons are continuously running tasks that help support Koha operation. Your database and web-server are run as daemons. Newer versions of Koha start two different daemons for most koha instances:

  • zebra - this is the index server

  • koha-indexer - this daemon updates the index server with new and modified data (biblios and authorities)

These daemons are started by the script /etc/init.d/koha-common.

Zebra indexer daemon

Script path: /usr/sbin/koha-indexer (invoked from /etc/init.d/koha-common)

The koha-indexer script invokes rebuild_zebra.pl in daemon mode. In this mode, the script will run continuously and check the database for new or modified data every 30 seconds. New or modified records are then sent to Zebra for indexing, which only takes a second or so. The advantage of this approach is a search system which is much more responsive to changes, compared to the cron job approach.

Supprimer abonnement

Il n’y a pas de modification d’adhérent en attente.

Chemin du script : misc/cronjobs/update_items.pl

Chemin du fichier : misc/cronjobs/fines.pl

Chemin du fichier : misc/cronjobs/fines.pl

Chemin du fichier : misc/cronjobs/fines.pl

Chemin du script : misc/cronjobs/zebraqueue_start.pl