From 63475eebe929394b7f78396cc45aa7ffdaa17ab4 Mon Sep 17 00:00:00 2001 From: "Wile E. Coyote" Date: Fri, 5 May 2017 08:46:21 +0000 Subject: [PATCH] CRONJOB Changes: 1) add timeout to rhs.py 2) remove rip.py 3) Add run of scripts to check for fs/nitb restart --- modules/rhizo_base/templates/rhizomatica.cron.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/rhizo_base/templates/rhizomatica.cron.erb b/modules/rhizo_base/templates/rhizomatica.cron.erb index caaadb6..478f809 100644 --- a/modules/rhizo_base/templates/rhizomatica.cron.erb +++ b/modules/rhizo_base/templates/rhizomatica.cron.erb @@ -3,10 +3,12 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn # m h dom mon dow user command +<% if @charge_scheme != 'nosub' -%> #SMS reminders for users 0 8 1 * * root /usr/bin/python /var/rhizomatica/rccn/rsc.py notice 0 8 3 * * root /usr/bin/python /var/rhizomatica/rccn/rsc.py reminder 0 21 7 * * root /usr/bin/python /var/rhizomatica/rccn/rsc.py deactivate +<% end -%> #SMS reminder for admin 0 */5 * * * root /var/rhizomatica/bin/check_account_balance.sh @@ -23,7 +25,7 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn # */10 * * * * root /home/rhizomatica/bin/bind_check.sh #Roaming jobs -*/10 * * * * root timeout 10m /usr/bin/python /var/rhizomatica/rccn/rrc.py -c -f > /dev/null 2>&1 ; /usr/bin/python /var/rhizomatica/rccn/rhs.py -c > /dev/null 2>&1 +*/10 * * * * root timeout 10m /usr/bin/python /var/rhizomatica/rccn/rrc.py -c -f > /dev/null 2>&1 ; timeout 10m /usr/bin/python /var/rhizomatica/rccn/rhs.py -c > /dev/null 2>&1 #*/15 * * * * root /usr/bin/python /var/rhizomatica/rccn/rhs.py > /dev/null 2>&1 # Push Subscribers created in the last hour, every 30 mins @@ -39,7 +41,7 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn <%= scope.function_fqdn_rand([59]) %> 4 * * 0 root /usr/bin/python /var/rhizomatica/rccn/rrc.py -p #Cleanup inactive users - 0 5 * * * root /usr/bin/python /var/rhizomatica/rccn/rip.py > /dev/null 2>&1 +# 0 5 * * * root /usr/bin/python /var/rhizomatica/rccn/rip.py > /dev/null 2>&1 <% if @bts_type == 'litecel' -%> # amplifier monitoring @@ -58,6 +60,9 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn #Restart osmo-nitb every 6 hours (This wasn't working anyway. If it is needed, do something more elegant!) # 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2>&1 > /dev/null +# Check if FS or NTIB needs restart + 30 3 * * * root /home/rhizomatica/bin/check_dirty.sh + #PostgreSQL backup 0 3 * * * postgres /home/rhizomatica/bin/pg_backup_rotated.sh