-
Notifications
You must be signed in to change notification settings - Fork 3
/
task_schedule_events.cfg
57 lines (49 loc) · 2.75 KB
/
task_schedule_events.cfg
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Configuration file for task_schedule.pl to run astromon jobs
subject Kadi events database
timeout 10000 # Default tool timeout
heartbeat_timeout 10 # Maximum age of heartbeat file (seconds)
iterations 1 # Run once then shut down task_schedule
print_error 1 # Print full log of errors
disable_alerts 0 # Don't disable alerts since this jobs runs just once/day
loud 0 # Run loudly or quietly (production mode)
# Data files and directories. The *_dir vars can have $ENV{} vars which
# get interpolated. (Note lack of task name after TST_DATA because this is just for test).
data_dir $ENV{SKA_DATA}/kadi # Data file directory
log_dir $ENV{SKA_DATA}/kadi/logs # Log file directory
bin_dir $ENV{SKA_SHARE}/kadi # Bin dir (optional, see task def'n)
master_log kadi_events.log # Composite master log (created in log_dir)
heartbeat task_sched_heartbeat_events
# Email addresses that receive an alert if there was a severe error in
# running jobs (i.e. couldn't start jobs or couldn't open log file).
# Processing errors *within* the jobs are caught with watch_cron_logs
alert [email protected]
# Define task parameters
# cron: Job repetition specification ala crontab
# exec: Name of executable. Can have $ENV{} vars which get interpolated.
# If bin_dir is defined then bin_dir is prepended to non-absolute exec names.
# log: Name of log. Can have $ENV{} vars which get interpolated.
# If log is set to '' then no log file will be created
# If log is not defined it is set to <task_name>.log.
# If log_dir is defined then log_dir is prepended to non-absolute log names.
# timeout: Maximum time (seconds) for job before timing out
# This has multiple jobs which get run in specified order
# Note the syntax 'exec <number> : cmd', which means that the given command is
# executed only once for each <number> of times the task is executed. In the
# example below, the commands are done once each 1, 2, and 4 minutes, respectively.
<task kadi_events>
cron * * * * *
check_cron * * * * *
exec /bin/mkdir -p $ENV{SKA_DATA}/kadi/update_events
exec /bin/cp $ENV{SKA_DATA}/kadi/events3.db3 $ENV{SKA_DATA}/kadi/update_events/
exec kadi_update_events --data-root=$ENV{SKA_DATA}/kadi/update_events
exec /bin/mv $ENV{SKA_DATA}/kadi/update_events/events3.db3 $ENV{SKA_DATA}/kadi/events3.db3
<check>
<error>
# File Expression
# ---------- ---------------------------
kadi.log error
kadi.log warning
kadi.log fatal
</error>
</check>
</task>