Elaborazioni pianificate

Un’elaborazione pianificata è un comando Linux per programmare l’esecuzione di un comando o di uno script sul server, che serve ad eseguire automaticamente processi ripetitivi. Gli script eseguiti come elaborazioni pianificate si usano solitamente per modificare file o database; tuttavia, possono eseguire compiti di altro genere, che non modifichino dati sul server, come ad esempio inviare notifiche per e-mail. Koha prevede molti processi pianificati che è possibile abilitare: indicizzazione del motore di ricerca, generazione delle notifiche di ritardo, pulizia dei dati, e molto altro. Questo capitolo spiega come usarli.

Crontab example

An example of a Koha crontab can be found in misc/cronjobs/crontab.example

The example includes sample boilerplate cronjob entries for the most commonly-used cronjobs.

Elaborazioni pianificate

Le posizioni indicate di seguito presumono un’installazione di sviluppo, che mette la programmazione dei processi nella cartella misc/; se si lavora su un’installazione standard, cercare i file di programmazione nella cartella bin/, se non si trovano in misc/

Backup

Daily Backup

Script path: misc/cronjobs/backup.sh

Does: Creates a daily backup of the Koha database.

Frequenza consigliata: giornaliera

Circolazione

Prenotazioni in coda

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

Che cosa fa: aggiorna il tabulato della coda delle prenotazioni.

Required by: Holds Queue Report

Frequenza consigliata: ogni 1-4 ore

Descrizione:

  • Si tratta di uno script che dovrebbe essere eseguito periodicamente, se la vostra biblioteca permette agli utenti di richiedere prenotazioni a scaffale. Questo script decide quale biblioteca deve incaricarsi di soddifare una data richiesta di prenotazione.

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

    If you do not want all of your libraries to participate in the on-shelf holds fulfillment process, you should list the the libraries that *do* participate in the process here by inputting all the participating library’s branchcodes, separated by commas ( e.g. «MPL,CPL,SPL,BML» etc. ).

    By default, the holds queue will be generated such that the system will first attempt to hold fulfillment using items already at the pickup library if possible. If there are no items available at the pickup library to fill a hold, build_holds_queue.pl will then use the list of libraries defined in StaticHoldsQueueWeight. If RandomizeHoldsQueueWeight is disabled ( which it is by default ), the script will assign fulfillment requests in the order the branches are placed in the StaticHoldsQueueWeight system preference.

    Per esempio, se il tuo sistema ha tre biblioteche, di varia dimensione (piccola, media e grande) e vuoi che il processo di assegnazione prenotazioni usi prima la alla grande biblioteca e poi le piccole, potresti impostare la preferenza di sistema “StaticHoldsQueueWeight” a «LRG,MED,SML».

    Se vuoi che il carico delle prenotazioni venga suddiviso equamente tra le varie biblioteche del sistema, abilita la preferenza di sistema RandomizeHoldsQueueWeight. Quando è attiva, l’ordine delle biblioteche verrà rigenerato casualmente ogni volta che viene creata la loro lista.

    Leaving StaticHoldsQueueWeight empty is contraindicated at this time. Doing so will cause the build_holds_queue script to ignore RandomizeHoldsQueueWeight, causing the script to request hold fulfillment not randomly, but by alphabetical order.

Prenotazioni scadute

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

Does: By default, this cron job will only automatically cancel 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.

Frequenza consigliata: giornaliera

Annulla sospensione prenotazioni

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

Does: This script 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.

Frequenza consigliata: giornaliera

Multe

Script: misc/cronjobs/fines.pl

Esegue: calcolo e attribuzione delle multe agli account degli utenti.

Required by: finesMode system preference

Frequenza consigliata: notturna

Static Fines

Script path: misc/cronjobs/staticfines.pl

Does: this script calculates and charges overdue fines to patron accounts

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 won’t be applied on a holiday.

Lungo ritardo

Percorso dello script: misc/cronjobs/longoverdue.pl

Che cosa fa: permette di specificare i ritardi necessari per cambiare lo stato di “smarrito” di un elemento ad un valore differente. Opzionalmente addebita gli elementi smarriti, utilizzando il prezzo di sostituzione registrato nel record di ciascun elemento.

Frequenza consigliata: notturna

Nota

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

Track Total Checkouts

Script path: misc/cronjobs/update_totalissues.pl

Does: updates the biblioitems.totalissues field in the database with the latest tally of checkouts based on historical issue statistics.

Frequenza consigliata: notturna

Warning

Se l’ora sul server del database non coincide con l’ora sul server di Koha, bisogna tenerne conto e probabilmente utilizzare l’opzione –since, invece dell’opzione –interval, per l’aggiornamento incrementale.

Nota

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

Genera file utenti per la circolazione offline

Script path: misc/cronjobs/create_koc_db.pl

Does: Generates the borrowers.db file for use with the Koha Offline Circulation tool

Frequenza consigliata: settimanale

Rinnovo automatico

Script path: misc/cronjobs/automatic_renewals.pl

Does: Will automatically renew items if you’re allowing automatic renewal with your circulation and fine rules.

Frequenza consigliata: notturna

Utenti

Batch Delete Patrons

Script path: 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.

Registrazioni non verificate

Script path: misc/cronjobs/delete_expired_opac_registrations.pl

Does: Deletes patron registrations that were submitted via the OPAC but not reviewed by the library within the number of days entered in the PatronSelfRegistrationExpireTemporaryAccountsDelay preference.

Frequenza consigliata: notturna

Registrazioni non confermate

Script path: misc/cronjobs/delete_unverified_opac_registrations.pl

Does: Deletes patron self registrations that were submitted via the OPAC but not confirmed via email within 24 hours. This is only necessary if you are requiring patrons to confirm their registrations via email with the PatronSelfRegistrationVerifyByEmail preference.

Frequenza consigliata: oraria

Rendi anonimi i dati degli utenti

Script path: misc/cronjobs/batch_anonymise.pl

Che cosa fa: si usa per rendere anonimi i dati degli utenti. Rimuove il dato borrowernumbers dallo storico della circolazione; in questo modo le statistiche vengono mantenute, ma le informazioni sugli utenti vengono elimiante per ragioni di riservatezza.

Trasforma ragazzo in adulto

Script: misc/cronjobs/j2a.pl

Che cosa fa: trasfoma un utente assegnato alla categoria ragazzi/giovani, inserendolo nella corrispondente cantegoria adulti, quando l’utente raggiunge il limite di età superiore impostato nelle Categorie utenti.

Frequenza consigliata: notturna

DESCRIPTION

Questo script è concepito per trasformare gli utenti delle categorie giovanili in adulti, rimuovere il garante ed aggiornare corrispondentemente i loro codici di categoria quando raggiungono il limite superiore di età stabilito nelle Categorie utenti.

USAGE EXAMPLES

«juv2adult.pl»

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

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

Avvisi

Coda dei messaggi

Script path: misc/cronjobs/process_message_queue.pl

Does: processes the message queue to send the check out, check in and hold filled emails and SMS message to users and sends outgoing emails to patrons. requires EnhancedMessagingPreferences to be on

Frequenza consigliata: 1-4 ore

Importante

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

Avvisi estesi

Script path: 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

Frequenza consigliata: notturna

Nota

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

Avviso di scadenza

Script path: misc/cronjobs/overdue_notices.pl

Che cosa fa:prepara gli avvisi per avvertire gli utenti (sia via mail, sia su carta) che il termine del prestito è scaduto.

Frequenza consigliata: notturna

Nota

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

See also

The misc/cronjobs/advance_notices.pl program 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.

Talking Tech

Per ulteriori informazioni sulla configurazione di questo prodotto di terzi si veda ` Talking Tech Appendix <#talkingtechappendix>`__.

Inviare il file delle notifiche

Script path: misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl

Che cosa fa: script che genera i file di avvisi in uscita Spec C per il sistema di notifica telefonico Talking Tech i-tiva.

Required by: TalkingTechItivaPhoneNotification

Frequenza consigliata: notturna

Ricevere il file delle notifiche

Script path: misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl

Che cosa fa: elabora il file Results ricevuto dal sistema di notifica telefonico Talking Tech i-tiva

Required by: TalkingTechItivaPhoneNotification

Frequenza consigliata: notturna

Notify Patrons of Expiration

Script path: misc/cronjobs/membership_expiry.pl

Does: Sends messages to warn patrons of their card expiration to the messaage queue cron.

Requires: MembershipExpiryDaysNotice

Frequenza consigliata: notturna

In elaborazione/Lista libri

Script path: misc/cronjobs/cart_to_shelf.pl

Che cosa fa: assegna la collocazione permanente a tutti gli elementi che hanno la collocazione LISTA

Required by: NewItemsDefaultLocation, InProcessingToShelvingCart, & ReturnToShelvingCart system preferences

Frequenza consigliata: oraria

Catalogo

Import Webservice Batch

Script path: misc/cronjobs/import_webservice_batch.pl

Does: A cron job for processing import bach queues of type “webservice”. Batches can also be processed through the UI.

Nota

This script is used for OCLC Connexion

Connexion Import Daemon

Script path: misc/bin/connexion_import_daemon.pl

Does: A daemon that 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

Nota

This script is used for OCLC Connexion

Batch Item Deletion

Script path: misc/cronjobs/delete_items.pl

Does: A batch item deletion tool, which generates a query against the items database and deletes the items matching the criteria specified in the command line arguments.

Check URL Quick

Script path: misc/cronjobs/check-url-quick.pl

Does: Check URLs from biblio records.

Nota

This script replaces the check-url.pl script

Controlla gli URL

Script: misc/cronjobs/check-url.pl

Che cosa fa: controlla gli URL contenuti nel campo 856$u. L’output dello script si può formattare come CSV o HTML. La versione HTML collega direttamente all’editor MARC del record bibliografico.

Frequenza consigliata: mensile

Learn more: http://wiki.koha-community.org/wiki/Check-url_enhancements

Delete Records via Leader

Script path: misc/cronjobs/delete_records_via_leader.pl

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

Aggiorna le Autorità

Script path: misc/cronjobs/merge_authorities.pl

Che cosa fa: aggiorna i record bibliografici con le variazioni apportate ai record dele autorità.

Nota

Il nome di questo script è fuorviante: il programma non fonde inisieme le autorità; invece, fonde i dati delle autorità con i record bibliografici collegati. Le modifiche ai record di atuorità saranno applicate ai record bibliografici che usano quelle autorità nel momento in cui si esegue lo script.

Richiesto da: preferenza di sistema dontmerge

Frequenza consigliata: notturna

Aggiornamento Periodici

Script: misc/cronjobs/serialsUpdate.pl

Che cosa fa: verifica se è presente un’uscita «in ritardo» sugli abbonamenti attivi; se c’è, la marca come ritardataria ed aggiunge la successiva come attesa.

Frequenza consigliata: notturna

Automatic item update

Script path: misc/cronjobs/automatic_item_modification_by_age.pl

Does: updates items based on the list of rules set forth in the Modifiche automatiche copie per età tool

Required by: Modifiche automatiche copie per età

Frequenza consigliata: notturna

OPAC

Feed RSS

Script: misc/cronjobs/rss/rss.pl

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

Frequenza consigliata: oraria

Visualizzatore di Autorità

Script path: misc/cronjobs/build_browser_and_cloud.pl

Che cosa fa: genera i contenuti per il visualizatore delle autorità nell’OPAC.

Required by: OpacBrowser system preference

Importante

Questa preferenza ed il realtivo cron job devono essere utilizzati solo su sistemi in Francese.

Nuvole Argomento/Autore

Script: misc/cronjobs/cloud-kw.pl

Che cosa fa: genera l’HTML per le nuvole di parole chiave, partendo dagli indici di Zebra. misc/cronjobs/cloud-sample.conf contiene us esempio di come lavora questo script.

Frequenza: questo è il tipo di script che si può eseguire una volta al mese o giù di lì; il contenuto prodotto non cambia moltissimo con l’andar del tempo.

Amministrazione del sistema

Services Throttle

Script path: misc/cronjobs/services_throttle.pl

Does: resets the xISBN services throttle

Frequenza consigliata: notturna

Pulizia del database

Script path: misc/cronjobs/cleanup_database.pl

Che cosa fa: tronca la tabella session, elimina le voci vecchie in zebraqueue , log di azione e file MARC in area di accumulo.

Share Usage Stats

Script path: misc/cronjobs/share_usage_with_koha_community.pl

Does: If you’re sharing information via the UsageStats feature this will send your info to the Hea website.

Frequenza: mensile

Acquisizioni

Cancella i suggerimenti più vecchi

Script path: misc/cronjobs/purge_suggestions.pl

Che cosa fa: rimuove dall’area di gestione i suggerimenti più vecchi (come definito da voi).

Email suggestions to process

Script path: misc/cronjobs/notice_unprocessed_suggestions.pl

Che cosa fa: genera un avviso al proprietario del fondo che ci sono suggerimenti da elaborare

EDI Message Processing

Script path: misc/cronjobs/edi_cron.pl

Fa: Invia e riceve i messaggi EDI

Frequenza: ogni 15 minuti

Remove Temporary EDI Files

Script path: misc/cronjobs/remove_temporary_edifiles.pl

Does: removes temporary EDI files that are older than 5 days

Reports

Run Report

Script path: misc/cronjobs/runreport.pl

Does: run pre-existing saved reports

Norwegian patron database

NL sync to Koha

Script path: misc/cronjobs/nl-sync-to-koha.pl

Does: sync patrons from the Norwegian national patron database (NL) to Koha

Note Relies on NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences

NL sync from Koha

Script path: misc/cronjobs/nl-sync-from-koha.pl

Does: sync patrons from Koha to the Norwegian national patron database (NL)

Note Relies on NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences

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

Frequenza consigliata: notturna

Update social data

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

Does: updates OPAC records with Babelthèque social data

Script di uso sconsigliato:

Questi non dovrebbero essere eseguiti senza modifiche:

Script path: misc/cronjobs/update_items.pl

Script: misc/cronjobs/smsoverdues.pl

Script: misc/cronjobs/notifyMailsOp.pl

Script: misc/cronjobs/reservefix.pl

Script path:misc/cronjobs/zebraqueue_start.pl