-
Notifications
You must be signed in to change notification settings - Fork 1
/
crontab
41 lines (36 loc) · 1.73 KB
/
crontab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
##########################################
# Logging & Notification for Cron Jobs
##########################################
#
# To only log output of a job to Docker logs:
# - Output of command must be passed to the `logger` command. You may optionally tag (-t) the message.
# - To log stdout AND stderr, you will need to redirect stderr to stdout by appending `2>&1` to the command.
# /path/to/my_cron_job.sh 2>&1 | logger -t MY_CRON
#
# To only receive email notifications with job output, output must be sent to stdout:
# - All script output will be emailed be default, whether script succeeds or fails.
# /path/to/my_cron_job.sh
#
# - To suppress output if job succeeds, preventing sending email notification, prefix with chronic.
# chronic /path/to/my_cron_job.sh
#
# To both receive email and log to Docker, you will need to duplicate the output to both `logger` and stdout:
# - This can be done via pipe into `pee` and passing both the `logger` and `cat` commands.
# /path/to/my_cron_job.sh 2>&1 | pee "logger -t MY_CRON" "cat"
#
# - To suppress output, preventing sending email notification, except in case the script fails.
# chronic mispipe "/path/to/my_cron_job.sh 2>&1" "pee 'logger -t MY_CRON' 'cat'"
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=$EMAIL
# VuFund cache clear on start
@reboot root chronic clear-vufind-cache 2>&1 | logger -t CACHE_CLEAR
# Harvest updates
${FOLIO_CRON_MINS} 3-23 * * * root cron-folio.sh
${HARV_CRON_MINS} 2 * * * root cron-hlm.sh
${HARV_CRON_MINS} 4 * * * root cron-authority.sh
# Course reserves update
${RESRV_CRON_MINS} * * * * root cron-reserves.sh
# Cleanup data
0 0 * * * root cron-searches.sh
15 0,6,18 * * * root cron-sessions.sh