The 11 minute cron is automatically added upon enabling any notification type. Its used to monitor for failed Email attempts and update Router uptime etc
Unfortunately WAN IP change monitoring cannot be enabled without also enabling WAN IP Email notifications, if you want WAN IP changes logged you must enable the Email notifications for it
The 11 minute cron is automatically added upon enabling any notification type. Its used to monitor for failed Email attempts and update Router uptime etc
Unfortunately WAN IP change monitoring cannot be enabled without also enabling WAN IP Email notifications, if you want WAN IP changes logged you must enable the Email notifications for it
I think it would be better if script can allow some customization of cron expression itself... Like every 10 days ... i dont want to write to /jffs every 11 mins or even every hour (which is the the max we can configure using current script).
Altering cron run intervals will directly affect the calculated estimated down time during reboot notifications... ie. you set cron to 10 days when the router comes back up if the last time cron ran was 10 days ago (last time router uptime was recorded) the reboot Email notification will say the router was down for 10 days between powerloss/reboot. If an Email fails to send the script will not try again till next time cron is scheduled to run.
As you're already aware you can edit cron in /jffs/scripts/addons/wicens/wicens_update_conf.wic to 59 mins, or this is the code used to check cron status
Code:
F_cru() {
case "$1" in
'check')
cru l | grep -Fq "$script_name_full" && return 0
return 1
;;
'create')
cru a wicens "*/${cron_check_freq} * * * * $script_name_full cron"
F_log_terminal_ok "Added entry in cron(cru) with ${cron_check_freq}m interval"
;;
'remove')
if F_cru check ; then
cru d wicens
F_log_terminal_ok "Removed entry in cron(cru)"
else
F_terminal_check_ok "No entry in cron(cru) to remove"
fi
;;
esac
return 0
} # cru
You can manually create any cron interval you want within cru as long as the script path contains /jffs/scripts/wicens.sh cron in your cru entry the script will operate fine, just remember router downtime calculations in reboot emails will be borked and re-attempts wont happen until cron runs again
Altering cron run intervals will directly affect the calculated estimated down time during reboot notifications... ie. you set cron to 10 days when the router comes back up if the last time cron ran was 10 days ago (last time router uptime was recorded) the reboot Email notification will say the router was down for 10 days between powerloss/reboot. If an Email fails to send the script will not try again till next time cron is scheduled to run.
As you're already aware you can edit cron in /jffs/scripts/addons/wicens/wicens_update_conf.wic to 59 mins, or this is the code used to check cron status
Code:
F_cru() {
case "$1" in
'check')
cru l | grep -Fq "$script_name_full" && return 0
return 1
;;
'create')
cru a wicens "*/${cron_check_freq} * * * * $script_name_full cron"
F_log_terminal_ok "Added entry in cron(cru) with ${cron_check_freq}m interval"
;;
'remove')
if F_cru check ; then
cru d wicens
F_log_terminal_ok "Removed entry in cron(cru)"
else
F_terminal_check_ok "No entry in cron(cru) to remove"
fi
;;
esac
return 0
} # cru
You can manually create any cron interval you want within cru as long as the script path contains /jffs/scripts/wicens.sh cron in your cru entry the script will operate fine, just remember router downtime calculations in reboot emails will be borked and re-attempts wont happen until cron runs again
Thanks for the response. As my requirement is just to send a email when router reboots and dont care about time and all so altering cron expression manually in script will work fine for me.
I think I might need to change in "F_serv_start()" function too correct?
Thanks for the response. As my requirement is just to send a email when router reboots and dont care about time and all so altering cron expression manually in script will work fine for me.
I think I might need to change in "F_serv_start()" function too correct?
Sorry yes, in order to not have to manually create your custom cru(cron) after reboots that function would need to be edited in /jffs/scripts/wicens.sh to be persistent.
Although you will always show a MD5(hotfix) update if ever checking for script updates. At this point if there ever is an update it will be version number change though. I've taken a massive leap and Im currently implementing an Opnsense firewall as my gateway so there likely won't be any further development of this script
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.