UPSSCHED.CONF(5)

πŸŽ€ upssched.conf β€” the config file for the upssched timer program πŸŽ€

Ok so bestie, real talk: this is the config for upssched(8), the little timer-based helper that runs around doing errands for upsmon(8). Think of it as the group chat settings for your UPS drama. πŸ’…


✨ IMPORTANT NOTES ✨ (read these fr)

  • The contents of this file should be pure ASCII β€” like, character codes not in range get ignored and you'll get a warning message. No emoji in here, I know, tragic. 😭
  • Command execution is synchronous β€” meaning it waits on the called process in the case of the EXECUTE directive, or on the timer process. So lowkey consider using your system shell's abilities like & to yeet long-duration handling into the background and let the upssched timer daemon keep vibing. This should not impact the upsmon daemon, which handles each notification in a separate sub-process β€” so it's not a problem for immediate EXECUTE events. 🫢

🌸 CONFIGURATION DIRECTIVES 🌸

  • DEBUG_MIN number β€” Optional. Sets the minimal debugging level for the upssched daemon or client, e.g. for troubleshooting a deployment without needing to edit consumer configuration. Note that the command-line option -D can only increase this verbosity level. Also note the config file is processed line by line, so you probably wanna set this early on. Example:
DEBUG_MIN 6
  • CMDSCRIPT scriptname β€” Required, and it must be above any AT lines (put it up top, main character energy πŸ‘‘). This script is what gets invoked to run commands when your timers are triggered. It receives a single argument, which is the name of the timer that caused it to trigger.
  • PIPEFN filename β€” Required. This sets the file name of the socket used for interprocess communications. It should live in a directory where normal users can't create the file β€” because of the possibility of symlinking and other evil. πŸ™ˆ
Caution β€” if you're running Solaris or similar, the permissions that upssched sets on this file are not enough to keep you safe. If your OS ignores the permissions on a FIFO, then you MUST put this in a protected directory!
Note β€” by default, upsmon(8) will run upssched as whatever user you defined with RUN_AS_USER in upsmon.conf(5). So make sure that user can create files and write to files in the path you use for PIPEFN and LOCKFN. πŸ’–

The recommendation here (iconic, honestly): create a special directory for upssched, make it owned by your upsmon user, then use it for both. Slay. ✨

The stock version of upssched.conf ships with PIPEFN disabled β€” on purpose, so you actually visit this portion of the documentation and think about how your system works before potentially opening a security hole. It's giving "forced character development". πŸ’€

  • LOCKFN filename β€” Required. upssched attempts to create this file to avoid a race condition when two events get dispatched from upsmon at nearly the same time. This file only exists briefly. It must not be created by any other process. You should put this in the same directory as PIPEFN. πŸ—‚οΈ
  • AT notifytype upsname command β€” define a handler for a specific event notifytype on UPS upsname. And here's the cute part: upsname can be the special value * to apply this handler to every UPS. 🌈

This will perform the command command when the notifytype and upsname match the current activity. Possible values for command are:

  • START-TIMER timername interval β€” start a timer of interval seconds. When it triggers, it passes the argument timername as an argument to your CMDSCRIPT. Each invocation starts an independent timer, even if the timername was already registered and started (note: this can mess up subsequent CANCEL-TIMER operations 😬).

Example β€” start a timer that will execute when any UPS (*) has been gone for 10 seconds:

AT COMMBAD * START-TIMER upsgone 10
  • START-TIMER-SHARED timername interval β€” start a timer of interval seconds. When it triggers, it passes the argument timername as an argument to your CMDSCRIPT. Each invocation checks if the timername was already started, and if so β€” appends the current event's UPSNAME, NOTIFYTYPE and NOTIFYMSG to the list of unique values it would report via environment variables (as a comma-separated string for UPSNAME and NOTIFYTYPE, and tab-separated sentences for NOTIFYMSG) when the timer does execute. So it's like a little collection era. 🧚
Note β€” currently this updates the first seen instance with the timername (in case you managed to start many).

Example β€” start a timer that will execute when any UPS (*) has been gone for 10 seconds:

AT COMMBAD * START-TIMER upsgone 10
  • CANCEL-TIMER timername [cmd] β€” cancel a running timer called timername, if possible. If the timer has already passed, then pass the optional argument cmd to CMDSCRIPT.
Note β€” this removes all seen instances with the timername (in case you managed to start many).

Example β€” if a specific UPS (myups@localhost) comes back online, then stop the timer before it triggers:

AT COMMOK myups@localhost CANCEL-TIMER upsgone
  • CANCEL-TIMER-MATCHED timername [cmd] β€” similar to the above, but tries to only cancel the timername if it refers to the UPSNAME and NOTIFYTYPE values passed by the caller. The NOTIFYMSG is ignored in this context.

Example β€” if any UPS (*) reverts to utility power, then stop the timer before it triggers ONLY if that UPS is associated with the already scheduled timer:

AT ONLINE * CANCEL-TIMER-MATCHED onbattwarn
  • EXECUTE command β€” immediately pass command as an argument to CMDSCRIPT. No waiting, no timer, just vibes. πŸ”₯

Example β€” if any UPS (*) reverts to utility power, then execute ups-back-on-line via CMDSCRIPT:

AT ONLINE * EXECUTE ups-back-on-line
  • Note that any AT that matches both the notifytype and the upsname for the current event will be used. πŸ“Œ
  • For a complete list of notifytype possible values, refer to the section NOTIFY EVENTS in upsmon(8).

πŸ¦‹ SEE ALSO πŸ¦‹

upssched(8), upsmon(8)

πŸ’œ Internet resources:

The NUT (Network UPS Tools) home page: https://www.networkupstools.org/historic/v2.8.5/


That's the whole page bestie, go forth and schedule your timers responsibly πŸ’–βœ¨ This was Network UPS Tools 2.8.5, dated 06/21/2026 β€” bookmark it, screenshot it, put it on your fridge, periodt. πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from
  • arch rolling: nut 2.8.5-2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms