87 lines
3.6 KiB
Text
87 lines
3.6 KiB
Text
#Rhizomatica cron jobs
|
|
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
|
|
|
|
#SMS cleanup
|
|
0 3 * * * root /var/rhizomatica/bin/sms_cleanup.sh
|
|
|
|
#RRDtools graphs
|
|
*/5 * * * * root /var/rhizomatica/bin/platform_update_rrd.sh
|
|
*/5 * * * * root /var/rhizomatica/bin/network_update_rrd.sh
|
|
*/1 * * * * root /var/rhizomatica/bin/network_update60.sh
|
|
|
|
#Bind check between OpenBSC and Kannel (disabled)
|
|
# */10 * * * * root /home/rhizomatica/bin/bind_check.sh
|
|
|
|
#Roaming jobs
|
|
# Look for connected IMSIs known in the dHLR.
|
|
*/10 * * * * root timeout 10m /usr/bin/python /var/rhizomatica/rccn/rrc.py -c -f > /dev/null 2>&1
|
|
|
|
# The last run time gets behind and then this job hangs and never completes, perpetuating this
|
|
# so just sync the last 15 mins every 10
|
|
*/10 * * * * root timeout 10m /usr/bin/python /var/rhizomatica/rccn/rhs.py -c -m 15 > /dev/null 2>&1
|
|
|
|
# Clean up the HLRs
|
|
45 4 * * 0 root timeout 10m /usr/bin/python /var/rhizomatica/rccn/rhs.py -de
|
|
|
|
# When phones are least likely to be physically moving about, reset the locations based on recent local LUR
|
|
35 3 * * * root timeout 10m /usr/bin/python /var/rhizomatica/rccn/rrc.py -o -l > /dev/null 2>&1
|
|
|
|
#*/15 * * * * root /usr/bin/python /var/rhizomatica/rccn/rhs.py > /dev/null 2>&1
|
|
|
|
*/10 * * * * root timeout 5m /usr/bin/python /var/rhizomatica/rccn/sqs.py > /dev/null 2>&1
|
|
|
|
# Push Subscribers created in the last hour, every 30 mins
|
|
*/30 * * * * root /usr/bin/python /var/rhizomatica/rccn/push.py -c -r1 > /dev/null 2>&1
|
|
|
|
#Do a full push once a week, random minute
|
|
<%= scope.function_fqdn_rand([59]) %> 3 * * 0 root /usr/bin/python /var/rhizomatica/rccn/push.py
|
|
|
|
#Do a full push once a month of not authorized Subs.
|
|
<%= scope.function_fqdn_rand([59]) %> 3 10 * * root /usr/bin/python /var/rhizomatica/rccn/push.py -n
|
|
|
|
# Purge Inactive Roaming Subscribers
|
|
<%= scope.function_fqdn_rand([59]) %> 4 8 */4 * 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
|
|
|
|
<% if @bts_type == 'litecel' -%>
|
|
# amplifier monitoring
|
|
*/5 * * * * root /home/rhizomatica/bin/monitor_amp.sh > /dev/null 2>&1
|
|
<% end -%>
|
|
|
|
# RAPI monitoring
|
|
*/5 * * * * root /home/rhizomatica/bin/monitor_rapi.sh > /dev/null 2>&1
|
|
|
|
#FreeSWITCH monitoring
|
|
*/10 * * * * root /home/rhizomatica/bin/monitor_freeswitch.sh > /dev/null 2>&1
|
|
|
|
#Billing
|
|
0 10 * * * root [ $(date +'\%d' -d tomorrow) -eq 1 ] && /var/rhizomatica/bin/active_subscribers.sh
|
|
|
|
#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
|
|
|
|
# It's a new day....
|
|
30 5 * * * root /home/rhizomatica/bin/check_broken.sh
|
|
|
|
# Check if FS or NTIB needs restart
|
|
30 2-5 * * * root /home/rhizomatica/bin/check_dirty.sh
|
|
|
|
#PostgreSQL backup
|
|
0 3 * * * postgres /home/rhizomatica/bin/pg_backup_rotated.sh > /dev/null 2>&1
|
|
|
|
#SQLite backup
|
|
0 4 * * * root /home/rhizomatica/bin/sqlite_backup_rotated.sh > /dev/null 2>&1
|