Updates to the example crontab
[koha.git] / misc / cronjobs / crontab.example
1 # Koha Example Crontab File
2 # Authors: Joe Atzberger <atz@liblime.com>
3 #          Joshua Ferraro <jmf@liblime.com>
4 #
5 # This is an example of a crontab file for Debian.  It may not work 
6 # in other versions of crontab, like on Solaris 8, for example.
7
8 # While similar in strcture, this is NOT an example for cron (as
9 # $USER).  Cron takes an extra argument per line to designate the
10 # user to run as.  You could  reasonably extrapoloate the needed
11 # info from here though.
12 #
13 # WARNING: These jobs will do things like charge fines, send
14 # potentially VERY MANY emails to patrons and even debar offending
15 # users.  DO NOT RUN OR SCHEDULE these jobs without being sure you
16 # really intend to.  Make sure the relevant message templates are
17 # configured to your liking before scheduling messages to be sent.
18
19 # ENVIRONMENT:
20 # Standard Debian crontab settings
21 SHELL=/bin/sh
22 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
23
24 # Establish Koha's two important ENV variables.
25
26 PERL5LIB=/home/liblime/kohaclone
27 KOHA_CONF=/home/liblime/kohaclone/etc/koha-conf.xml
28
29 # Some additional variables to save you typing
30 KOHA_CRON_PATH = /home/liblime/kohaclone/misc/cronjobs
31 KOHA_USER = koha
32 NOTICE_EMAIL = your.email@your.domain
33
34 # MULTIPLE KOHA SUPPORT:
35 # You can still run jobs for this user's additional koha installs.
36 #
37 # For example, on the same codebase:
38 # */10 * * * *    KOHA_CONF=/home/liblime/koha-test/etc/koha-conf.xml /home/liblime/kohaclone/misc/migration_tools/rebuild_zebra.pl -b -z >/dev/null
39 #
40 # For example, on a separate codebase:
41 # */10 * * * *    KOHA_CONF=/home/liblime/koha-test/etc/koha-conf.xml PERL5LIB=/home/liblime/koha-test /home/liblime/koha-test/misc/migration_tools/rebuild_zebra.pl -b -z >/dev/null
42
43 #
44 # SCHEDULED JOBS:
45 # Don't forget to keep the empty line at the bottom. 
46 # Cron/crontab will choke without it.
47 #
48 ##### Cheat Sheet
49 # min (0-59), hr (0-23), day of mo (1-31), mo of yr (1-12), day of wk (0-6 with 0=Sunday), command
50 #
51 # Examples:
52 # every 10 minutes
53 # */10 *    * * *
54 # every hour at 17 past
55 # 17 *    * * *
56
57 # ZEBRA INDEX UPDATES with -z option, incremental index updates throughout the day
58 # for both authorities and bibs
59 */10 * * * * $USER $KOHA_CRON_PATH/../misc/migration_tools/rebuild_zebra.pl -b -a -z >/dev/null
60
61 # Hourly holds queue updated
62 # runs every hour, on the hour
63 01 *  * * * $USER $KOHA_CRON_PATH/holds/build_holds_queue.pl
64 # | mailx -s HoldsList $NOTICE_EMAIL
65
66 # OVERDUE NOTICES
67 # runs every morning at 6:01am
68 01 6 * * * $USER $KOHA_CRON_PATH/overdue_notices.pl
69
70 # ADVANCED NOTICES
71 10 1 * * * $USER $KOHA_CRON_PATH/advance_notices.pl -c
72
73 # SEND EMAILS
74 # (run after overdue_notices.pl
75 15 * * * * $USER $KOHA_CRON_PATH/process_message_queue.pl
76
77 # PROCESS LONG OVERDUES
78 # updates item status from available to longoverdue for items long overdue
79 # runs every night, right before fines.pl
80 10 21 * * 1 $USER $KOHA_CRON_PATH/longoverdue.pl --lost 20=2 --lost 100=1 --charge 1 --confirm
81
82 # FINES
83 # runs every night, right after longoverdue.pl
84 10 22 * * 1 $USER $KOHA_CRON_PATH/longoverdue.pl
85
86 ## j2a -- updates juvennile patrons to adults
87 # runs every night, right on time ;-)
88 59 24 * * 1 $USER $KOHA_CRON_PATH/j2a.pl
89
90 ## services_throttle -- resets the xISBN service
91 # runs every night, right on time ;-)
92 59 23 * * 1 $USER $KOHA_CRON_PATH/services_throttle.pl
93
94 # backups -- backs up the system 
95 # runs every evening at 9:15
96 15 21 * * * $USER $KOHA_CRON_PATH/backup.sh
97