1 # Koha Example Crontab File
2 # Author: Joe Atzberger <atz@liblime.com>
4 # This is an example of a crontab file for Debian. It may not work
5 # in other versions of crontab, like on Solaris 8 or BSD, for example.
7 # While similar in structure,
8 # this is NOT an example for cron (as root). Cron takes an extra
9 # argument per line to designate the user to run as. You could
10 # reasonably extrapolate the needed info from here though.
12 # WARNING: These jobs will do things like charge fines, send
13 # potentially VERY MANY emails to patrons and even debar offending
14 # users. DO NOT RUN OR SCHEDULE these jobs without being sure you
15 # really intend to. Make sure the relevant message templates are
16 # configured to your liking before scheduling messages to be sent.
19 # First, establish Koha's two important ENV variables.
21 PERL5LIB=/usr/share/koha/lib
22 KOHA_CONF=/etc/koha/koha-conf.xml
24 # Some additional variables to save you typing
25 KOHA_CRON_PATH = /usr/share/koha/bin/cronjobs
27 # MULTIPLE KOHA SUPPORT:
28 # You can still run jobs for this user's additional koha installs,
29 # by manipulating those variables in the command.
31 # For example, on the same codebase:
32 # */10 * * * * __KOHA_USER__ KOHA_CONF=/etc/koha/koha-conf.xml /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -z >/dev/null
34 # For example, on a separate codebase:
35 # */10 * * * * __KOHA_USER__ KOHA_CONF=/etc/koha/koha-conf.xml PERL5LIB=/home/koha/kohaclone /home/koha/kohaclone/misc/migration_tools/rebuild_zebra.pl -b -a -z >/dev/null
38 # See the perldoc of individual scripts to determine what other options
39 # are available. Check the man page for crontab to understand the
40 # schedule syntax for your system.
42 # NOTE: Don't forget to keep the empty line at the bottom.
43 # Cron/crontab will choke without it.
46 # m h dom mon dow user command
49 # AUTOMATIC RENEWAL + FINES + OVERDUE NOTICES
50 # Sequence is important - renew what can be renewed, charge fines for the rest, print fine amount into overdue notices
51 5 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/automatic_renewals.pl; $KOHA_CRON_PATH/fines.pl; $KOHA_CRON_PATH/overdue_notices.pl -t
54 10 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/advance_notices.pl -c
56 # MEMBERSHIP_EXPIRY NOTICES
58 15 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/membership_expiry.pl -c
61 18 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/serialsUpdate.pl -c
63 # PROCESS LONG OVERDUES
64 # updates item status from available to longoverdue for items long overdue
65 # 19 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/longoverdue.pl --lost 90=1 --confirm
68 15 * * * * __KOHA_USER__ $KOHA_CRON_PATH/process_message_queue.pl
70 # Hourly holds queue updated
71 52 * * * * __KOHA_USER__ $KOHA_CRON_PATH/holds/build_holds_queue.pl >/dev/null 2>&1
73 # Cancel expired holds
74 0 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/holds/cancel_expired_holds.pl >/dev/null 2>&1
76 # Auto unsuspend holds
77 0 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/holds/auto_unsuspend_holds.pl > /dev/null 2>&1
79 # Update popularity counts for biblio records
80 0 2 * * * __KOHA_USER__ $KOHA_CRON_PATH/update_totalissues.pl --commit=1000 --use-stats --incremental --interval=1d >/dev/null 2>&1
82 # ZEBRA INDEX UPDATES with -z option, incremental index updates throughout the day
83 # for both authorities and bibs
84 */10 * * * * __KOHA_USER__ $KOHA_CRON_PATH/../migration_tools/rebuild_zebra.pl -b -a -z >/dev/null
86 # services_throttle -- resets the xISBN service
87 59 23 * * * __KOHA_USER__ $KOHA_CRON_PATH/services_throttle.pl > /dev/null 2>&1
89 # clean up databases nightly. Be sure not to run this with --sessions during a time when the system is in use!
90 16 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/cleanup_database.pl --sessions --zebraqueue 10 --list-invites
92 # delete old purchase suggestions weekly. Replace XX with a number to define the age of suggestions to delete.
93 @weekly __KOHA_USER__ $KOHA_CRON_PATH/purge_suggestions.pl --days XX > /dev/null 2>&1
95 # share_usage_with_koha_community.pl every months
96 0 0 1 * * __KOHA_USER__ $KOHA_CRON_PATH/share_usage_with_koha_community.pl