]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/crontab.example
Merge branch 'master' of git.evergreen-ils.org:Evergreen-DocBook into doc_consolidati...
[working/Evergreen.git] / Open-ILS / examples / crontab.example
1 # Evergreen crontab.example
2 # Author: Joe Atzberger, ESI
3 # Author: Bill Erickson, ESI
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 or BSD, for example.
7
8 # While similar in structure, 
9 # this is NOT an example for cron (as root).  Cron takes an extra
10 # argument per line to designate the user to run as.  You could 
11 # reasonably extrapolate the needed 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 # Except where indicated, these processes only need to run 
20 # on 1 Evergreen server/brick.
21
22
23 # ENVIRONMENT:
24 # First, establish Evergreen ENV variables.
25 #
26 OPENILS    = /openils
27 SRF_CORE   = /openils/conf/opensrf_core.xml
28 EG_BIN_DIR = /openils/bin
29
30 # crontab format:
31 # m h dom mon dow   command
32
33 # Run the hold targeter
34 */15 * * * *   . ~/.bashrc && $EG_BIN_DIR/hold_targeter.pl $SRF_CORE
35
36 # Run the hold thawer
37 5  0  * * *   . ~/.bashrc && $EG_BIN_DIR/thaw_expired_frozen_holds.srfsh
38
39 # Generate fines
40 30 0  * * *   . ~/.bashrc && $EG_BIN_DIR/fine_generator.pl $SRF_CORE
41
42 # Run the reshelving completer
43 2  0  * * *   . ~/.bashrc && $EG_BIN_DIR/reshelving_complete.srfsh
44
45 # create the list of blocked patrons for offline use
46 # Note: The resulting list.txt file needs to be copied to all Apache servers
47 30 6  * * *   . ~/.bashrc && $EG_BIN_DIR/offline-blocked-list.pl $SRF_CORE > $OPENILS/var/web/standalone/list.txt
48
49 # Restart SIP nightly to free up any orphaned processes.  
50 # Note: Run on all SIP servers
51 # 5  2  * * *   . ~/.bashrc && oils_ctl.sh -d $OPENILS/var/pid -s $OPENILS/conf/oils_sip.xml -a stop_sip
52 # 8  2  * * *   . ~/.bashrc && oils_ctl.sh -d $OPENILS/var/pid -s $OPENILS/conf/oils_sip.xml -a start_sip
53
54 # Run the circ history cleanup job
55 # Note: destroys link between user and item
56 #2  0  * * *   . ~/.bashrc && $EG_BIN_DIR/clear_expired_circ_history.srfsh
57
58 # Run the hard due date updater
59 2  3  * * *   . ~/.bashrc && $EG_BIN_DIR/update_hard_due_dates.srfsh
60
61 # Action/Trigger entries ----
62
63 # Runs all pending A/T events every half hour
64 */30 * * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending
65
66 # Passive A/T event generation.
67 # Note: push these back to 3am so they will run after the fine generator and spread out the start minute to reduce dogpiling
68 0 * * * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly
69 5 3 * * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily
70 10 3 * * 1-5 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays
71 15 3 * * 0   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly
72 20 3 1 * *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly
73 25 3 1 1 *   . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly
74
75 # Legacy overdue/predue notice generator.  Change to suit.
76 #XML_FILE_PREFIX = /openils/var/data/overdue/overdue
77 #0 3 * * * . ~/.bashrc && cd $EG_BIN_DIR && ./generate_circ_notices.pl --osrf_config $SRF_CORE --notice-types overdue,predue --generate-global-templates --send-email > $XML_FILE_PREFIX.$(date +"\%F").xml
78
79 # TODO: add other entries
80