Environment condition specific cron job

Status
Not open for further replies.

Goose

Dabbler
Joined
Oct 4, 2014
Messages
25
I'd like a cron job that runs frequently but only when running on UPS power.

Conceptually I'm hoping to get an email, say, every minute while UPS power giving me the power delta as reported and therefore an approximate time until shutdown. As an aside the job would also power down / sleep any VMs or Jails running too.

Is there a "[OB DISCHRG]" trigger that I could start from? I guess I would then need to query the UPS service directly as the ups.log only has 5 minute updates.

Mad (bad) idea or possible?
 

Goose

Dabbler
Joined
Oct 4, 2014
Messages
25
Not yet! TBH though I've not tried too hard, away for Christmas, away for January (until now) so maybe this weekend!
 
Status
Not open for further replies.
Top