-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcrontab-workstation.txt
executable file
·13 lines (10 loc) · 1.16 KB
/
crontab-workstation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
THRESHOLD_DISK_PERCENT=90
NODE_PATH=.
*/5 * * * * pkill -0 -x Dropbox || echo "Dropbox not running on $(hostname -s)"
*/10 * * * * for percentage in $(df | grep /dev/disk | grep -v /Volumes/ | grep -vi virtualbox | awk '{print $5}' | tr -d \%) ; do if [ "$percentage" -gt $THRESHOLD_DISK_PERCENT ] ; then df | mail -s "disk space problem on $(hostname -s) ($percentage > $THRESHOLD_DISK_PERCENT)" $MAILTO ; fi ; done
* * * * * ( test -s ~/Dropbox/Misc/ScreenSaverMonitor.$(hostname -s).log && pkill -0 -x ScreenSaverMonitor ) || ( echo "Starting ScreenSaverMonitor on $(hostname -s)">&2; killall ScreenSaverMonitor ; ~/Dropbox/Misc/ScreenSaverMonitor 2>&1 | /usr/local/bin/ts >> ~/Dropbox/Misc/ScreenSaverMonitor.$(hostname -s).log ) &
0 * * * * ps auwx >> ~/Dropbox/Misc/pslog.$(hostname -s).log 2>&1
0 * * * * /sbin/ifconfig -a >> ~/Dropbox/Misc/ifconfig.$(hostname -s).log 2>&1
*/30 * * * * curl --silent --show-error https://ipv4.myip.info/json | /usr/local/bin/jq -c . >> ~/Dropbox/Misc/myip.info.$(hostname -s).log 2>&1
0 2 * * * cp -prn ~ernie/.bash_history ~ernie/Dropbox/Misc/bash_history/bash_history-$(date +\%Y\%m\%d-$(hostname -s))