-
Notifications
You must be signed in to change notification settings - Fork 0
/
crontab
executable file
·30 lines (26 loc) · 2.84 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
# To setup those task you should:
# sudo chown root:root crontab
# sudo chmod 755 crontab
# sudo ln -s $(pwd)/crontab /etc/cron.d/tomatic
SHELL=/bin/bash
TOMATIC_PATH=/opt/www/somenergia-tomatic
PATH=/opt/www/somenergia-tomatic/.venv/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
TOMATIC_CRONLOG=/var/log/somenergia/crontab-tomatic.log
# m h dom mon dow user command
00 9 * * 1-5 somenergia (echo "$(date -Iseconds) Updating queue"; cd $TOMATIC_PATH; tomatic_rtqueue.py set ; tomatic_rtqueue.py show ; tomatic_rtqueue.py monitor) >> $TOMATIC_CRONLOG 2>&1
15 10 * * 1-5 somenergia (echo "$(date -Iseconds) Updating queue"; cd $TOMATIC_PATH; tomatic_rtqueue.py set ; tomatic_rtqueue.py show ; tomatic_rtqueue.py monitor) >> $TOMATIC_CRONLOG 2>&1
30 11 * * 1-5 somenergia (echo "$(date -Iseconds) Updating queue"; cd $TOMATIC_PATH; tomatic_rtqueue.py set ; tomatic_rtqueue.py show ; tomatic_rtqueue.py monitor) >> $TOMATIC_CRONLOG 2>&1
45 12 * * 1-5 somenergia (echo "$(date -Iseconds) Updating queue"; cd $TOMATIC_PATH; tomatic_rtqueue.py set ; tomatic_rtqueue.py show ; tomatic_rtqueue.py monitor) >> $TOMATIC_CRONLOG 2>&1
00 14 * * 1-5 somenergia (echo "$(date -Iseconds) Updating queue"; cd $TOMATIC_PATH; tomatic_rtqueue.py set ; tomatic_rtqueue.py show ; tomatic_rtqueue.py monitor) >> $TOMATIC_CRONLOG 2>&1
00 15 * * 5 somenergia (echo "$(date -Iseconds) Updating extensions"; cd $TOMATIC_PATH; tomatic_extensions.py load; tomatic_extensions.py show) >> $TOMATIC_CRONLOG 2>&1
*/2 9-13 * * 1-5 somenergia (echo "$(date -Iseconds) Monitoring queue"; cd $TOMATIC_PATH; tomatic_rtqueue.py monitor ) >> $TOMATIC_CRONLOG 2>&1
55 8 * * 1-5 somenergia (echo "$(date -Iseconds) Notify queue"; cd $TOMATIC_PATH; crontab-warnturn.sh ) >> $TOMATIC_CRONLOG 2>&1
10 10 * * 1-5 somenergia (echo "$(date -Iseconds) Notify queue"; cd $TOMATIC_PATH; crontab-warnturn.sh ) >> $TOMATIC_CRONLOG 2>&1
25 11 * * 1-5 somenergia (echo "$(date -Iseconds) Notify queue"; cd $TOMATIC_PATH; crontab-warnturn.sh ) >> $TOMATIC_CRONLOG 2>&1
40 12 * * 1-5 somenergia (echo "$(date -Iseconds) Notify queue"; cd $TOMATIC_PATH; crontab-warnturn.sh ) >> $TOMATIC_CRONLOG 2>&1
10 14 * * 1-5 somenergia (echo "$(date -Iseconds) Daily report"; cd $TOMATIC_PATH; crontab-dailyreport.sh) >> $TOMATIC_CRONLOG 2>&1
50 23 * * * somenergia (echo "$(date -Iseconds) Daily stats"; cd $TOMATIC_PATH; tomatic_dailyreport.py --sendmail) >> $TOMATIC_CRONLOG 2>&1
## Generacio setmanal automagica de les graelles
00 22 * * 7 somenergia (echo "$(date -Iseconds) Timetable generation"; cd $TOMATIC_PATH; crontab-launchtimetable.sh) >> $TOMATIC_CRONLOG 2>&1
## Treu les graelles antigues
52 13 * * * somenergia (echo "$(date -Iseconds) Retire old timetables"; cd $TOMATIC_PATH; tomatic_timetable.py retireold) >> $TOMATIC_CRONLOG 2>&1