-
Notifications
You must be signed in to change notification settings - Fork 0
/
crontab
30 lines (28 loc) · 4.4 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
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
# Demultiplexing - after running python script the status is checked. 0 = script completed without error. 1 = script did not complete. This status triggers an event to the syslog
0,20,40 * * * * mokaguys eval "$(/usr/local/bin/miniconda3/bin/conda shell.bash hook)"; conda activate /home/mokaguys/.conda/envs/python3.10.6; cd /usr/local/src/mokaguys/apps/automate_demultiplex/; /usr/local/src/mokaguys/apps/automate_demultiplex/venv/bin/python3 -m demultiplex > /usr/local/src/mokaguys/automate_demultiplexing_logfiles/Demultiplex_cron_stdout/$(date "+\%Y\%m\%d_\%H\%M\%S").txt 2>&1; status=$?; if [ $status -ne 0 ]; then echo "demultiplex script failed to complete " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t demultiplex_script_fail; else echo "Successful completion of demultiplex script " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t demultiplex_script_pass; fi
# Setoff_workflows - after running python script the status is checked. 0 = script completed without error. 1 = script did not complete. This status triggers an event to the syslog
5,25,45 * * * * mokaguys eval "$(/usr/local/bin/miniconda3/bin/conda shell.bash hook)"; conda activate /home/mokaguys/.conda/envs/python3.10.6; cd /usr/local/src/mokaguys/apps/automate_demultiplex/; /usr/local/src/mokaguys/apps/automate_demultiplex/venv/bin/python3 -m setoff_workflows > /usr/local/src/mokaguys/automate_demultiplexing_logfiles/Setoff_workflows_cron_stdout/$(date "+\%Y\%m\%d_\%H\%M\%S").txt 2>&1; status=$?; if [ $status -ne 0 ]; then echo "Setoff_workflows script failed to complete " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t setoff_workflows_script_fail; else echo "Successful completion of setoff_workflows script " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t setoff_workflows_script_success; fi
# Workstation heartbeat
*/20 * * * * root echo 'padam padam' 2>&1 | /usr/bin/logger -t Heartbeat
# Low space on workstation warning
0 * * * * root FREE=$(df /media/data3 --output=avail | tail -n 1); FREEHR=$(df /media/data3 --output=avail -h | tail -n 1); if [ "$FREE" -lt 838860371 ]; then echo "Less than 800GB available on /media/data3: $FREEHR" | /usr/bin/logger -t workstation_freespace; fi
# DNANexus platform integrity test - after running python script the status is checked. 0 = script completed without error. 1 = script did not complete. This status triggers an event to the syslog
0 4 * * 3 root bash /usr/local/src/mokaguys/apps/DNANexus_Integrity_Test/DNANexus_Integrity_Check.sh > /usr/local/src/mokaguys/apps/DNANexus_Integrity_Test/logs/$(date "+\%y\%m\%d_\%H\%M\%S").txt 2>&1; status=$?; if [ $status -ne 0 ]; then echo "DNANexus integrity script failed to complete " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t Nexus_integrity_check_fail; else echo "successful completion of Nexy integrity check script " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t Nexus_integrity_check_pass; fi
# Workstation cleaner - Deletes runfolders uploaded to DNANexus every Monday at 6am
0 6 * * 1 mokaguys eval "$(/usr/local/bin/miniconda3/bin/conda shell.bash hook)"; conda activate python3.10.6 && cd /usr/local/src/mokaguys/apps/automate_demultiplex && python3 -m wscleaner; status=$?; if [ $status -ne 0 ]; then echo "wscleaner script failed to complete " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t wscleaner_script_fail; else echo "Successful completion of wscleaner script " $(date "+\%y\%m\%d_\%H\%M\%S")|/usr/bin/logger -t wscleaner_script_success; fi
# Workstation ngrok script - on reboot, starts ngrok and writes url to syslog
@reboot root /usr/local/src/mokaguys/apps/ngrok_start/ngrok_start.sh docker
# clean up docker
40 12 * * * root docker ps -a | grep Exited | cut -b1-12 | xargs docker rm