# /sbin/upssched is called by upsmon using upsmon.conf

PIPEFN /var/run/nut/upssched.pipe
LOCKFN /var/run/nut/upssched.lock

CMDSCRIPT /etc/nut/upsevent

# immediately call script on these events
# this lets us record the UPS data associated with an event
AT ONLINE * EXECUTE online
AT ONBATT * EXECUTE onbatt
AT LOWBATT * EXECUTE lowbatt
AT COMMOK * EXECUTE commok
AT REPLBATT * EXECUTE replbatt

# set up a timer to fire after 15 seconds on battery
# we define this to be a "real outage"
# anything short of a real outage doesn't set off panic alerts
AT ONBATT * START-TIMER  realout 15
AT ONLINE * CANCEL-TIMER realout

# set up a timer to fire after extended time on battery
# cancel if power comes back before then
AT ONBATT * START-TIMER  longbatt 60
AT ONLINE * CANCEL-TIMER longbatt

# EOF upssched.conf
