diff --git a/scripts/crontiles.sh b/scripts/crontiles.sh index 1c3addc..75d3f58 100755 --- a/scripts/crontiles.sh +++ b/scripts/crontiles.sh @@ -1,6 +1,7 @@ #!/bin/sh command="systemctl restart uwsgi-tiles" +append="2>&1 | /usr/bin/logger -t uwsgi-tiles" if crontab -l | grep -q "$command" ; then echo "Cron already set." @@ -8,7 +9,7 @@ if crontab -l | grep -q "$command" ; then fi # Runs at X:14 -(crontab -l 2>/dev/null; echo "14 * * * * $command") | crontab - +(crontab -l 2>/dev/null; echo "14 * * * * $command $append") | crontab - echo "Cron set successfully." exit 0 diff --git a/scripts/setupcron.sh b/scripts/setupcron.sh index 042e282..18b2d83 100755 --- a/scripts/setupcron.sh +++ b/scripts/setupcron.sh @@ -8,10 +8,10 @@ if crontab -l | grep -q "$monpath" ; then fi # Runs every 5 min and waits 3 min -(crontab -l 2>/dev/null; echo "3-59/5 * * * * $monpath/scripts/calcglobalstats.py") | crontab - +(crontab -l 2>/dev/null; echo "3-59/5 * * * * $monpath/scripts/calcglobalstats.py 2>&1 | /usr/bin/logger -t calcglobalstats") | crontab - # Runs at 4:02 -(crontab -l 2>/dev/null; echo "2 4 * * * $monpath/scripts/deletestats.py") | crontab - +(crontab -l 2>/dev/null; echo "2 4 * * * $monpath/scripts/deletestats.py 2>&1 | /usr/bin/logger -t deletestats") | crontab - echo "Cron set successfully." exit 0