This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:clear_watchdog [2018/08/07 08:50] jeff |
uphp:functions:clear_watchdog [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 11: | Line 11: | ||
</ | </ | ||
- | Clears the watchdog timer. | + | Clears the watchdog timer. |
====Parameters==== | ====Parameters==== | ||
Line 25: | Line 25: | ||
<code php> | <code php> | ||
<? | <? | ||
- | clear_watchdog(); | + | clear_watchdog(); |
?> | ?> | ||
</ | </ | ||
Line 31: | Line 31: | ||
====Additional Information==== | ====Additional Information==== | ||
- | Function [[init_watchdog]] can be called to set the value. Alternatively the value will be loaded at startup | + | Function [[clear_watchdog]] is called from cronmin.cgi once per minute (WattmonOS 2.26 and above). The default threshold value is 300 seconds (5 minutes), therefore, if cronmin.cgi does not complete at least once during 5 minutes the system will reboot. |
+ | |||
+ | Function [[init_watchdog]] can be called to set the threshold in seconds for when the firmware reboots the system (if function [[clear_watchdog]] has not been called during this time). Alternatively the value set by [[init_watchdog]] can be loaded at startup | ||
+ | |||
+ | < | ||
+ | [debug] | ||
+ | watchdog_interval=600 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | This function must be used if you are writing a script that might run longer than 5 minutes, which could possibly keep cronmin.cgi from being able to run, depending on how many scripts can run at the same time. Or it might be needed if the default cronmin.cgi is not used. | ||
====Also See==== | ====Also See==== |