Taiga 1274 (24976) Updated guided reports process
[kohadocs.git] / source / cron_jobs.rst
1 .. include:: images.rst
2
3 .. _cron-jobs-label:
4
5 Cron jobs and Daemons
6 =====================
7
8 Koha is supported by a number of background tasks.  These tasks can either
9 be periodically executed tasks (cron jobs) or continuously running task called
10 daemons.
11
12 A cron job is a Linux command for scheduling a command or script on your
13 server to complete repetitive tasks automatically. Scripts executed as a
14 cron job are typically used to modify files or databases; however, they
15 can perform other tasks that do not modify data on the server, like
16 sending out email notifications.
17
18 A daemon is a Linux command that is typically started when the system is
19 booted and runs in the background doing some function.  The database used
20 by Koha (either mysql or mariadb) is a daemon as is the webserver (typically
21 Apache).
22
23 Koha has many cron jobs in place that you can enable
24 (search engine indexing, overdue notice generation, data
25 cleanup and more), and a few daemons.  This chapter will explain those for you.
26
27 Crontab example
28 -------------------------
29
30 An example of a Koha crontab can be found in misc/cronjobs/crontab.example
31
32 The example includes sample boilerplate cronjob entries for the most
33 commonly-used cronjobs.
34
35 .. _cron-jobs-subchapter-label:
36
37 Cron jobs
38 -------------------------
39
40 The locations below assume a dev install which puts the crons in misc/,
41 if you have a standard install you may want to look in bin/ for these
42 files if you cannot find them in misc/
43
44 .. _daily-backup-label:
45
46 Backup
47 ~~~~~~~~~~~~~~~~~~~~~~~~
48
49 Daily backup
50 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
52 Script path: misc/cronjobs/backup.sh
53
54 Does: creates a daily backup of the Koha database.
55
56 Frequency suggestion: daily
57
58 .. _search-label:
59
60 Search
61 ~~~~~~~~~~~~~~~~~~~~~~~~
62
63 .. _sitemap-label:
64
65 Sitemap
66 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
68 Script path: misc/cronjobs/sitemap.pl
69
70 Does: processes all biblio records from a Koha instance and generates sitemap files
71 complying with the protocol as described on http://sitemaps.org. The goal of this
72 script is to be able to provide to search engines direct access to biblio records.
73 It avoids leaving search engines browsing Koha's OPAC which would generate a lot
74 of site traffic and server workload.
75
76     **Note**
77     A file named sitemapindex.xml is generated. It contains references to multiple
78     sitemap files. Each file contains at most 50,000 URLs and is named
79     sitemapXXXX.xml.
80     
81     The files must be stored on the Koha OPAC's root directory. In the same directory
82     a robots.txt file with the following contents is required:
83     
84     
85     ``Sitemap: sitemapindex.xml
86     User-agent: *
87     Disallow: /cgi-bin/``
88
89 .. _rebuild-index-label:
90
91 Rebuild index
92 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93
94 Script path: misc/migration\_tools/rebuild\_zebra.pl
95
96 Does: updates Zebra indexes with recently changed data.
97
98 Required by: Zebra
99
100 Frequency suggestion: every x minutes, (between 5-15 minutes) depending
101 on performance needs
102
103     **Note**
104     On newer Koha installations, this cron job has been replaced by  the
105     :ref:'koha-indexer daemon <_koha-indexer-label>' which indexes new
106     and modified Koha data every 30 seconds.
107
108 .. _cron-circulation-label:
109
110 Circulation
111 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
112
113 .. _holds-queue-label:
114
115 Holds queue
116 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
118 Script path: misc/cronjobs/holds/build\_holds\_queue.pl
119
120 Does: updates holds queue report
121
122 Required by: :ref:`Holds queue report <holds-queue-label>`
123
124 Frequency suggestion: every 1-4 hours
125
126 Description:
127
128 -  A script that should be run periodically if your library system
129    allows borrowers to place on-shelf holds. This script decides which
130    library should be responsible for fulfilling a given hold request.
131
132    It's behavior is controlled by the system preferences
133    :ref:`StaticHoldsQueueWeight <staticholdsqueueweight,-holdsqueueskipclosed-&-randomizeholdsqueueweight-label>` and
134    :ref:`RandomizeHoldsQueueWeight <staticholdsqueueweight,-holdsqueueskipclosed-&-randomizeholdsqueueweight-label>`.
135
136    If you do not want all of your libraries to participate in the
137    on-shelf holds fulfillment process, you should list the the libraries
138    that \*do\* participate in the process here by inputting all the
139    participating library's branchcodes, separated by commas ( e.g.
140    "MPL,CPL,SPL,BML" etc. ).
141
142    By default, the holds queue will be generated such that the system
143    will first attempt to hold fulfillment using items already at the
144    pickup library if possible. If there are no items available at the
145    pickup library to fill a hold, build\_holds\_queue.pl will then use
146    the list of libraries defined in StaticHoldsQueueWeight. If
147    RandomizeHoldsQueueWeight is disabled ( which it is by default ), the
148    script will assign fulfillment requests in the order the branches are
149    placed in the StaticHoldsQueueWeight system preference.
150
151    For example, if your system has three libraries, of varying sizes (
152    small, medium and large ) and you want the burden of holds
153    fulfillment to be on larger libraries before smaller libraries, you
154    would want StaticHoldsQueueWeight to look something like
155    "LRG,MED,SML".
156
157    If you want the burden of holds fulfillment to be spread out equally
158    throughout your library system, simply enable
159    RandomizeHoldsQueueWeight. When this system preference is enabled,
160    the order in which libraries will be requested to fulfill an on-shelf
161    hold will be randomized each time the list is regenerated.
162
163    Leaving StaticHoldsQueueWeight empty is contraindicated at this time.
164    Doing so will cause the build\_holds\_queue script to ignore
165    RandomizeHoldsQueueWeight, causing the script to request hold
166    fulfillment not randomly, but by alphabetical order.
167
168 .. _expired-holds-label:
169
170 Expired holds
171 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172
173 Script path: misc/cronjobs/holds/cancel\_expired\_holds.pl
174
175 Does: cancels holds
176 where the user has set an expiration date. If the library is using the
177 :ref:`ExpireReservesMaxPickUpDelay` and
178 :ref:`ExpireReservesMaxPickUpDelayCharge`
179 preferences then this script will also cancel holds that have been
180 sitting on the hold shelf for too long and will (if the library does)
181 charge the patron for not picking up the hold.
182
183 Frequency suggestion: daily
184
185 .. _unsuspend-holds-label:
186
187 Unsuspend holds
188 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189
190 Script path: misc/cronjobs/holds/auto\_unsuspend\_holds.pl
191
192 Does: checks to find holds that should no longer be
193 suspended and removes the suspension if the
194 :ref:`AutoResumeSuspendedHolds` preference is
195 set to 'allow'. This puts the patron back in to the queue where they
196 were when the hold was suspended.
197
198 Frequency suggestion: daily
199
200 .. _fines-label:
201
202 Fines
203 ^^^^^^^^^^^^^^^^^^^^^^^^^
204
205 Script path: misc/cronjobs/fines.pl
206
207 Does: calculates and posts fines to patron accounts.
208
209 Required by: :ref:`finesMode` system preference
210
211 Frequency suggestion: nightly
212
213 .. _staticfines-label:
214
215 Static Fines
216 ^^^^^^^^^^^^^^^^^^^^^^^^^
217
218 Script path: misc/cronjobs/staticfines.pl
219
220 Does: calculates and charges overdue fines to patron accounts
221
222     **Note**
223     If the Koha system preference 'finesMode' is set to 'production', the fines
224     are charged to the patron accounts. If set to 'test', the fines are calculated but not applied.
225     
226     **Note**
227     Fines won't be applied on a holiday.
228
229 .. _long-overdues-label:
230
231 Long overdues
232 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
233
234 Script path: misc/cronjobs/longoverdue.pl
235
236 Does: allows one to specify delays for changing items to different lost
237 statuses, and optionally charge for them using the replacement price
238 listed on the item record.
239
240 Frequency suggestion: nightly
241
242     **Note**
243
244     Staff can control some of the parameters for the longoverdue cron
245     job with the
246     :ref:`DefaultLongOverdueLostValue <defaultlongoverduelostvalue-&-defaultlongoverduedays-label>` and
247     :ref:`DefaultLongOverdueChargeValue`
248     preferences.
249
250 .. _track-total-checkouts-label:
251
252 Track total checkouts
253 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254
255 Script path: misc/cronjobs/update\_totalissues.pl
256
257 Does: updates the biblioitems.totalissues field in the database with the
258 latest tally of checkouts based on historical issue statistics.
259
260 Frequency suggestion: nightly
261
262     **Warning**
263
264     If the time on your database server does not match the time on your Koha
265     server you will need to take that into account, and probably use the
266     --since argument instead of the --interval argument for incremental
267     updating.
268
269     **Note**
270
271     This cronjob can be used if there is a performance concern. Otherwise,
272     use the UpdateTotalIssuesOnCirc System Preference.
273
274 .. _generate-patron-file-for-offline-circulation-label:
275
276 Generate patron file for offline circulation
277 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278
279 Script path: misc/cronjobs/create\_koc\_db.pl
280
281 Does: generates the borrowers.db file for use with the :ref:`Koha offline
282 circulation <offline-circ-tool-for-windows-label>` tool
283
284 Frequency suggestion: weekly
285
286 .. _automatic-renewal-label:
287
288 Automatic renewal
289 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
290
291 Script path: misc/cronjobs/automatic\_renewals.pl
292
293 Does: renews items if you're allowing automatic
294 renewal with your :ref:`circulation and fine rules <circulation-and-fine-rules-label>`.
295
296 Frequency suggestion: nightly
297
298 .. _patrons-label:
299
300 Patrons
301 ~~~~~~~~~~~~~~~~~~~~~~~~~~
302
303 .. _delete-patrons-label:
304
305 Batch delete patrons
306 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
307
308 Script path: misc/cronjobs/delete\_patrons.pl
309
310 Does: deletes patron records in batch based on date not borrowed since,
311 expired before, last seen, category code, or library branch.
312
313      **Note**
314
315      Dates should be in ISO format, e.g., 2013-07-19, and can be 
316      generated with date -d '-3 month' "+%Y-%m-%d".
317
318      **Important**
319
320      The options to select the patron records to delete are **cumulative**. 
321      For example, supplying both --expired_before and --library specifies 
322      that patron records must meet *both* conditions to be selected for deletion.
323
324      **PARAMETERS**
325
326      -  --not_borrowed_since
327         Delete patrons who have not borrowed since this date.
328
329      -  --expired_before
330         Delete patrons with an account expired before this date.
331
332      -  --last_seen
333         Delete patrons who have not been connected since this date. 
334         The system preference :ref:`TrackLastPatronActivity` must be 
335         enabled to use this option.
336
337      -  --category_code
338         Delete patrons who have this category code.
339
340      -  --library
341         Delete patrons in this library.
342
343      -  -c|--confirm
344         This flag must be provided in order for the script to actually 
345         delete patron records. If it is not supplied, the script will 
346         only report on the patron records it would have deleted.
347
348      -  -v|--verbose
349         Verbose mode.
350
351 .. _unverified-registrations-label:
352
353 Unverified registrations
354 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
355
356 Script path: misc/cronjobs/delete\_expired\_opac\_registrations.pl
357
358 Does: deletes patron registrations that were submitted via the OPAC but
359 not reviewed by the library within the number of days entered in the
360 :ref:`PatronSelfRegistrationExpireTemporaryAccountsDelay`
361 preference.
362
363 Frequency suggestion: nightly
364
365 .. _unconfirmed-registrations-label:
366
367 Unconfirmed registrations
368 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
369
370 Script path: misc/cronjobs/delete\_unverified\_opac\_registrations.pl
371
372 Does: deletes patron self registrations that were submitted via the OPAC
373 but not confirmed via email within 24 hours. This is only necessary if
374 you are requiring patrons to confirm their registrations via email with
375 the
376 :ref:`PatronSelfRegistrationVerifyByEmail`
377 preference.
378
379 Frequency suggestion: hourly
380
381 .. _anonymize-patron-data-label:
382
383 Anonymize patron data
384 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
385
386 Script path: misc/cronjobs/batch\_anonymise.pl
387
388 Does: removes borrowernumbers
389 from circulation history so that the stats are kept, but the patron
390 information is removed for privacy reasons.
391
392 .. _update-child-to-adult-patron-type-label:
393
394 Update child to adult patron type
395 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
396
397 Script path: misc/cronjobs/j2a.pl
398
399 Does: converts juvenile/child patrons from juvenile patron category and
400 category code to corresponding adult patron category and category code
401 when they reach the upper age limit defined in the Patron Categories.
402
403 Frequency suggestion: nightly
404
405     **DESCRIPTION**
406     
407     This script is designed to update patrons from juvenile to adult patron
408     types, remove the guarantor, and update their category codes
409     appropriately when they reach the upper age limit defined in the Patron
410     Categories.
411
412     **USAGE EXAMPLES**
413     
414     "juv2adult.pl"
415     
416     "juv2adult.pl" -b=<branchcode> -f=<categorycode> -t=<categorycode> 
417     (Processes a single branch, and updates the patron categories from
418     category to category)
419     
420     "juv2adult.pl" -f=<categorycode> -t=<categorycode> -v -n (Processes all
421     branches, shows all messages, and reports the patrons who would be
422     affected. Takes no action on the database)
423
424 .. _notices-label:
425
426 Notices
427 ~~~~~~~~~~~~~~~~~~~~~~~~~~
428
429 .. _message-queue-label:
430
431 Message queue
432 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
433
434 Script path: misc/cronjobs/process\_message\_queue.pl
435
436 Does: processes the message queue to send the check out, check in and
437 hold filled emails and SMS message to users and sends outgoing emails to
438 patrons. requires
439 :ref:`EnhancedMessagingPreferences` to be
440 on
441
442 Frequency suggestion: 1-4 hours
443
444     **Important**
445
446     Item due and Advanced due notices are controlled by the
447     :ref:`advance\_notices cron <advanced-notice-label>`.
448
449 .. _advanced-notice-label:
450
451 Advanced notice
452 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
453
454 Script path: misc/cronjobs/advance\_notices.pl
455
456 Does: prepares "pre-due" notices and "item due" notices for patrons who
457 request them prepares notices for patrons for items just due or coming
458 due soon. requires
459 :ref:`EnhancedMessagingPreferences` to be
460 on
461
462 Frequency suggestion: nightly
463
464     **Note**
465
466     This script does not actually send the notices. It queues them in
467     the :ref:`message queue <message-queue-label>` for later
468
469 .. _overdue-notice-label:
470
471 Overdue notice
472 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
473
474 Script path: misc/cronjobs/overdue\_notices.pl
475
476 Does: prepares messages to alert patrons of overdue messages (both via
477 email and print)
478
479 Frequency suggestion: nightly
480
481     **Note**
482
483     This script does not actually send the notices. It queues them in
484     the :ref:`message queue <message-queue-label>` for later or generates the
485     HTML for later printing
486
487     **See also**
488     
489     The misc/cronjobs/advance\_notices.pl program allows you to send
490     messages to patrons in advance of their items becoming due, or to alert
491     them of items that have just become due.
492
493 .. _printoverdues-label:
494
495 Print overdues
496 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
497
498 Script path: misc/cronjobs/printoverdues.sh
499
500 Does: generates PDF files from HTML files in directories and prints them
501
502 .. _print-hold-notices-label:
503
504 Print hold notices
505 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
506
507 Script path: misc/cronjobs/gather\_print\_notices.pl
508
509 Does: looks through the message queue for hold notices that didn't go
510 through because the patron didn't have an email address and generates a
511 print notice
512
513 Frequency suggestion: nightly
514
515 .. _talking-tech-label:
516
517 Talking Tech
518 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
519
520 To learn more about setting up this third party product view the
521 :ref:`Talking Tech <talking-tech-label>` chapter.
522
523 .. _sending-notices-file-label:
524
525 Sending notices file
526 '''''''''''''''''''''''''''''''''''''''''''''''
527
528 Script path: misc/cronjobs/thirdparty/TalkingTech\_itiva\_outbound.pl
529
530 Does: generates Spec C outbound notifications file for Talking
531 Tech i-tiva phone notification system.
532
533 Required by:
534 :ref:`TalkingTechItivaPhoneNotification`
535
536 Frequency suggestion: nightly
537
538 .. _receiving-notices-file-label:
539
540 Receiving notices file
541 ''''''''''''''''''''''''''''''''''''''''''''''''''''
542
543 Script path: misc/cronjobs/thirdparty/TalkingTech\_itiva\_inbound.pl
544
545 Does: processes received results files for Talking Tech i-tiva
546 phone notification system.
547
548 Required by:
549 :ref:`TalkingTechItivaPhoneNotification`
550
551 Frequency suggestion: nightly
552
553 .. _notify-patrons-of-expiration-label:
554
555 Notify patrons of expiration
556 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
557
558 Script path: misc/cronjobs/membership\_expiry.pl
559
560 Does: sends messages to warn patrons of their card expiration to the
561 :ref:`message queue <message-queue-label>` cron.
562
563 Requires: :ref:`MembershipExpiryDaysNotice`
564
565 Frequency: nightly
566
567 .. _in-processing/book-cart-label:
568
569 In processing/book cart
570 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
571
572 Script path: misc/cronjobs/cart\_to\_shelf.pl
573
574 Does: updates all items with a location of CART to the item's permanent
575 location.
576
577 Required by: :ref:`NewItemsDefaultLocation`,
578 :ref:`InProcessingToShelvingCart`, &
579 :ref:`ReturnToShelvingCart` system preferences
580
581 Frequency suggestion: hourly
582
583 .. _catalog-label:
584
585 Catalog
586 ~~~~~~~~~~~~~~~~~~~~~~~~~~
587
588 .. _import-webservice-batch-label:
589
590 Import webservice batch
591 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
592
593 Script path: misc/cronjobs/import\_webservice\_batch.pl
594
595 Does: processes import bach queues of type 'webservice'.
596 Batches can also be processed through the UI.
597
598     **Note**
599     
600     This script is used for OCLC Connexion
601     
602 .. _connexion-import-daemon-label:
603
604 Connexion import daemon
605 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
606
607 Script path: misc/bin/connexion\_import\_daemon.pl
608
609 Does: listens for OCLC Connexion requests and is compliant with
610 OCLC Gateway specification. It takes requests with MARC XML and import batch
611 parameters from a configuration file and forwards it to svc/import_bib
612
613     **Note**
614     
615     This script is used for OCLC Connexion
616
617 .. _delete-items-label:
618
619 Batch item deletion
620 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
621
622 Script path: misc/cronjobs/delete\_items.pl
623
624 Does: generates a query against the items
625 database and deletes the items matching the criteria specified in the
626 command line arguments.
627
628     **PARAMETERS**
629     
630     -  --verbose
631        Send the "WHERE" clause generated by the collected C<--where> 
632        arguments, as well as items affected to Standard Out.
633
634     -  --where
635        The C<--where> option may called multiple times. The following 
636        argument must be a syntactically valid SQL statement which is 
637        part of the C<WHERE> clause querying the items table. 
638        These are joined by C<AND>.
639
640     -  --commit
641        No items will be deleted unless the C<--commit> flag is present.
642
643     **EXAMPLES**
644
645     The following are examples of this script:
646
647     delete_items.pl --where "items.withdrawn ! 0" --where "items.withdrawn_on < $(date --date="13 month ago" --rfc-3339=date)" --commit
648
649     delete_items.pl --where "itemlost >= '1'" --where "itemlost <='4'" --where "itemlost_on < '2014-04-28'" --commit
650
651 .. _check-url-quick-label:
652
653 Check URL quick
654 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
655
656 Script path: misc/cronjobs/check-url-quick.pl
657
658 Does: checks URLs from biblio records; scans all URLs found by default in 
659 856$u of bibliographic records and displays if resources are available or 
660 not.
661
662     **Note**
663     
664     This script replaces the check-url.pl script
665
666     **PARAMETERS**
667
668     -  --host=http://default.tld
669        Server host used when URL doesn't have one, ie doesn't begin with 
670        'http:'. For example, if --host=mylib.com, then when 856$u contains 
671        'img/image.jpg', the url checked is: http://www.mylib.com/image.jpg.
672
673     -  --tags
674        Tags containing URLs in $u subfields. If not provided, 856 tag is 
675        checked. Multiple tags can be specified, for example:
676
677        check-url-quick.pl --tags 310 410 856
678
679     -  --verbose|v
680        Outputs both successful and failed URLs.
681
682     -  --html 
683        Formats output in HTML. The result can be redirected to a file 
684        accessible by http. This way, it's possible to link directly to the 
685        bibliographic record in edit mode. With this parameter --host-intranet 
686        is required.
687
688     -  --host-intranet=http://koha-pro.tld
689        Server host used to link to bibliographic record editing page in 
690        Koha intranet interface.
691
692     -  --timeout=10
693        Timeout for fetching URLs. By default 10 seconds.
694
695     -  --maxconn=1000
696        Number of simulaneous HTTP requests. By default 200 connexions.
697
698 .. _check-urls-label:
699
700 Check URLs
701 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
702
703 Script path: misc/cronjobs/check-url.pl
704
705 Does: checks URLs in 856$u field. Script output can now be formatted in
706 CSV or HTML. The HTML version links directly to MARC biblio record
707 editor.
708
709 Frequency suggestion: monthly
710
711 Learn more: http://wiki.koha-community.org/wiki/Check-url_enhancements
712
713 .. _delete-records-via-leader-label:
714
715 Delete records via leader
716 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
717
718 Script path: misc/cronjobs/delete\_records\_via\_leader.pl
719
720 Does: attempts to delete any MARC records where the leader character 5 equals 'd'.
721
722      **PARAMETERS**
723
724      -  -c|--confirm
725         Script will do nothing without this parameter
726
727      -  -v|--verbose
728         Verbose mode
729
730      -  -t|--test
731         Test mode, does not delete records. Test mode cannot determine 
732         if a record/item will be deleted successfully, it will only tell 
733         you what records and items the script will attempt to delete.
734
735      -  -i|--delete-items
736         Try deleting items before deleting record. 
737         Records with items cannot be deleted.
738
739 .. _update-authorities-label:
740
741 Update authorities
742 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
743
744 Script path: misc/cronjobs/merge\_authorities.pl
745
746 Does: updates biblio data with changes to authorities records
747
748     **Note**
749
750     The name of this script is misleading. This script does not merge
751     authorities together it instead merges authority data with linked
752     bib records. Edits to authority records will be applied to
753     bibliographic records that use that authority when this script is
754     run.
755
756 Required by: :ref:`AuthorityMergeLimit <authoritymergelimit-label>` 
757 system preference
758
759 Frequency suggestion: nightly
760
761 .. _serials-update-label:
762
763 Serials update
764 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
765
766 Script path: misc/cronjobs/serialsUpdate.pl
767
768 Does: checks if there is a "late" issue on active subscriptions, and if
769 there is, the script will set it as late, and add the next one as
770 expected.
771
772 Frequency suggestion: nightly
773
774 .. _automatic-item-update-label:
775
776 Automatic item update
777 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
778
779 Script path: misc/cronjobs/automatic\_item\_modification\_by\_age.pl
780
781 Does: updates items based on the list of rules set forth in the
782 :ref:`Automatic item modifications by age` tool
783
784 Required by: :ref:`Automatic item modifications by age`
785
786 Frequency suggestions: nightly
787
788 .. _opac-label:
789
790 OPAC
791 ~~~~~~~~~~~~~~~~~~~~~
792
793 .. _rss-feeds-label:
794
795 RSS feeds
796 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
797
798 Script path: misc/cronjobs/rss/rss.pl
799
800 Does: produces an RSS XML document for any SQL query (not used for
801 search results RSS feed). :ref:`Learn more <custom-rss-feeds-label>`.
802
803 Frequency suggestion: hourly
804
805 .. _authorities-browser-label:
806
807 Authorities browser
808 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
809
810 Script path: misc/cronjobs/build\_browser\_and\_cloud.pl
811
812 Does: generates content for authorities browse in OPAC
813
814 Required by: :ref:`OpacBrowser` system preference
815
816     **Important**
817
818     This preference and cron job should only be used on French systems.
819
820 .. _subject/author-clouds-label:
821
822 Subject/author clouds
823 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
824
825 Script path: misc/cronjobs/cloud-kw.pl
826
827 Does: generates HTML keywords clouds from Koha Zebra indexes.
828 misc/cronjobs/cloud-sample.conf has a sample of how this script
829 operates.
830
831 Frequency: This is the type of script you can run once a month or so,
832 the content generated isn't going to change very much over time.
833
834 .. _system-administration-label:
835
836 System administration
837 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
838
839 .. _services-throttle-label:
840
841 Services throttle
842 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
843
844 Script path: misc/cronjobs/services\_throttle.pl
845
846 Does: resets the xISBN services throttle
847
848 Frequency suggestion: nightly
849
850 .. _clean-up-database-label:
851
852 Clean up database
853 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
854
855 Script path: misc/cronjobs/cleanup\_database.pl
856
857 Does: truncates the sessions table, cleans out old zebraqueue entries,
858 action logs and staged MARC files.
859
860 .. _share-usage-stats-label:
861
862 Share usage stats
863 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
864
865 Script path: misc/cronjobs/share\_usage\_with\_koha\_community.pl
866
867 Does: sends your info to the `Hea
868 website <http://hea.koha-community.org/>`__
869 if you're sharing information via the :ref:`UsageStats`
870 feature 
871
872 Frequency: monthly
873
874 .. _acquisitions-label:
875
876 Acquisitions
877 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
878
879 .. _clean-up-old-suggestions-label:
880
881 Clean up old suggestions
882 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
883
884 Script path: misc/cronjobs/purge\_suggestions.pl
885
886 Does: removes old (defined by you) suggestions from the suggestion
887 management area.
888
889        **Note**
890        
891        The system preference :ref:`PurgeSuggestionsOlderThan` defines the number
892        of days used in the script
893
894 .. _email-suggestions-to-process-label:
895
896 Email suggestions to process
897 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
898
899 Script path: misc/cronjobs/notice\_unprocessed\_suggestions.pl
900
901 Does: generates a notice to the fund owner that there are suggestions in
902 need of processing
903
904 .. _edi-message-processing-label:
905
906 EDI message processing
907 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
908
909 Script path: misc/cronjobs/edi\_cron.pl
910
911 Does: sends and received EDI messages
912
913 Frequency: Every 15 minutes
914
915 .. _remove-temporary-edi-files-label:
916
917 Remove temporary EDI files
918 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
919
920 Script path: misc/cronjobs/remove\_temporary\_edifiles.pl
921
922 Does: removes temporary EDI files that are older than 5 days
923
924 .. _deprecated-scripts-label:
925
926 .. _cron-reports-label:
927
928 Reports
929 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
930
931 Run report
932 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
933
934 Script path: misc/cronjobs/runreport.pl
935
936 Does: runs pre-existing saved reports
937
938      **PARAMETERS**
939
940      -  -v|--verbose
941         Verbose output
942
943      -  --format=s
944         Selects format. Choice of text, html, csv or tsv
945
946      -  -e|--email 
947         Whether or not to use e-mail (implied by --to or --from)
948
949      -  -a|--attachment
950         Attach the report as a file. Cannot be used with html format
951
952      -  --username
953         Username to pass to the SMTP server for authentication
954
955      -  --password
956         Password to pass to the SMTP server for authentication
957
958      -  --method
959         The type of authentication. Ie. LOGIN, DIGEST-MD5, etc.
960
961      -  --to=s
962         E-mail address to send report to
963
964      -  --from=s
965         E-mail address to send report from
966
967      -  --subject=s
968         Subject for the e-mail
969
970      -  --store-results
971         Store the result of the report
972
973      -  --csv-header
974         Add column names as first line of csv output
975
976      **ARGUMENTS**
977
978      -  reportID 
979         Report ID Number from saved_sql.id, multiple ID's may be specified
980
981 Norwegian patron database
982 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
983
984 NL sync to Koha
985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
986
987 Script path: misc/cronjobs/nl-sync-to-koha.pl
988
989 Does: syncs patrons from the Norwegian national patron database (NL) to Koha
990
991     **Note**
992     Relies on NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences
993     
994 NL sync from Koha
995 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
996
997 Script path: misc/cronjobs/nl-sync-from-koha.pl
998
999 Does: syncs patrons from Koha to the Norwegian national patron database (NL)
1000
1001     **Note**
1002     Relies on NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences
1003     
1004 Social data
1005 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1006
1007 Get report social data
1008 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1009
1010 Script path: misc/cronjobs/social_data/get\_report\_social\_data.pl
1011
1012 Does: downloads data from Babelthèque to add to OPAC records
1013
1014 Frequency suggestion: nightly
1015
1016 Update social data
1017 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1018
1019 Script path: misc/cronjobs/social_data/update\_social\_data.pl
1020
1021 Does: updates OPAC records with Babelthèque social data
1022
1023 .. _daemons-subchapter-label:
1024
1025 Daemons
1026 -------------------------
1027
1028 Daemons are continuously running tasks that help support Koha
1029 operation.  Your database and webserver are run as daemons.
1030 Newer versions of Koha start two different daemons for most koha instances:
1031
1032   - zebra - this is the index server
1033
1034   - koha-indexer - this daemon updates the index server with
1035     new and modified data (biblios and authorities)
1036
1037 These daemons are started by the script /etc/init.d/koha-common.
1038
1039 .. _koha-indexer-label:
1040
1041 Zebra indexer daemon
1042 ~~~~~~~~~~~~~~~~~~~~
1043
1044 Script path: /usr/sbin/koha-indexer (invoked from /etc/init.d/koha-common)
1045
1046 The koha-indexer script invokes rebuild_zebra.pl in daemon mode.
1047 In this mode, the script will run continuously and check the database
1048 for new or modified data every 30 seconds.  New or modified records
1049 are then sent to Zebra for indexing, which only takes a second or so.
1050 The advantage of this approach is a search system which is much more
1051 responsive to changes, compared to the
1052 :ref:'cron job approach <_rebuild-index-label>'.
1053
1054 Deprecated scripts
1055 --------------------
1056
1057 These should not be run without modification:
1058
1059 Script path: misc/cronjobs/update\_items.pl
1060
1061 Script path:misc/cronjobs/smsoverdues.pl
1062
1063 Script path:misc/cronjobs/notifyMailsOp.pl
1064
1065 Script path:misc/cronjobs/reservefix.pl
1066
1067 Script path:misc/cronjobs/zebraqueue\_start.pl