chris.mason;485298 Wrote: > Yes, sorry should have been clearer. To do all this, I'm using the "End > of Day" section in the setings for SPC. I have "Allowed idle time" set > to 10 minutes (normally), and start time of 10pm, with end time of 6am. > So I'd expect that once the "Clear" command had been issued from the > Windows PC, SPC would start monitoring for idle players again, and > shutdown the server 10 minutes later. Yes, it ought to work exactly that way. What are you using to set and clear the blocks? Is it possible that the block isn't getting cleared? Can you post your code?
Also, can you set SrvrPowerCtrl's logging to 'debug' and run some more tests and then post the relevant lines from the server.log? In your tests, make sure that you don't set the EOD idle-timeout to 0. Zero is a special case that I'll describe below in a long-winded discussion. <long-winded discussion> Let me say right off the bat that I think I need to tweak how the EOD watcdog functions. But first, let me describe how it currently works. The EOD function, as currently implemented in the latest beta, has several 'wrinkles': 1). If EOD monitoring is enabled, AND if 'wake for alarms' is enabled, AND if the EOD action is set to a custom script OR if the EOD action is not the same as the regular 'On-Idle' action, THEN SrvrPowerCtrl treats the start of the EOD monitoring period as an alarm and will wake the machine up for the EOD event. With the right combination of On Idle and EOD actions, this can make sense. With the wrong combination, you can see something as stupid as the system waking itself out of hibernation just to put itself into suspend. 2). If the EOD idle period is set to 0, the EOD watchdog skips the 'players playing' check. In this context, a 'not idle' condition would only be a srvrpowerctrl block, a firmware update in progress, or the db being scanned. So, EOD idle period == 0 will result in the EOD watchdog taking action even if players are playing. 3). The EOD watchdog doesn't get enabled if a). the EOD idle period is set to 0 AND b). if SrvrPowerCtrl trys to enable the EOD watchdog between the EOD start and end times. So, the zero EOD idle period is a special case: it's designed this way to allow a 'one-time' execution of a action. So generally, setting the EOD idle period to 0 makes more sense if you have a very short EOD monitoring period. What you were seeing in your tests with the EOD idle time-out set to 0 is actually the expected behavior, however counter-intuitive it appears. This is how I use EOD: normally, I have the regular idle watchdog set to suspend my server after a 45 minute idle period. I have my EOD watchdog idle period set to 0 and the start and end times set for 2:00 am and 2:05 am. I have the command set for a custom script. So, usually my server suspends sometime during the evening, with SrvrPowerCtrl programming the system to wake up at 1:55 am, the standard 5 minutes before the EOD "alarm". At 2:00, the EOD watchdog fires off my custom script which stops SqueezeCenter, performs lots of housekeeping on my server and finally reboots the machine. When the machine boots back up and SrvrPowerCtrl comes back on line, it sees that it's already 'inside' the EOD period and that the idle timeout is set to 0, so it ignores the request to enable the EOD watchdog. After 2:05AM, the regular On-Idle watchdog comes back on line and 45 minutes later, my server suspends again. A further EOD tweak I've been thinking about, inspired by rickwookie's posts to this thread: 1). If the EOD watchdog gets enabled within the EOD start and end times AND if the EOD idle timeout is set to 0, then the 'regular' EOD action (the one selected in the drop-down list in the settings) gets performed, rather than the custom script. This will allow the EOD to perform a 'one-two punch': custom script the 1st time, regular action second time. The caveat here would be: the custom script must execute in under a minute or set a srvrpowerctrl block or stop the SBS service. </long-winded discussion> Even without that tweak, the EOD function ought to work for you as it is. For your case, though, I don't think you should ever be setting the EOD idle time-out to 0, even in your tests. One final note: when testing, you can speed up SrvrPowerCtrl's 'heart beat' by editing the Watchdog.pm file. At the top of the file, change the value of: my $nTimerInterval = 60; ..to something shorter, say 20, so you don't have to wait an entire minute between SrvrPowerCtrl idle checks. This is a way to speed up time, so to speak, so that testing is not such a time-waster. -- gharris999 ------------------------------------------------------------------------ gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115 View this thread: http://forums.slimdevices.com/showthread.php?t=48521 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins