[mythtv-users] Mythwelcome Wakeup Periods - do they need to be in order?

Paul Harrison mythtv at dsl.pipex.com
Thu Nov 22 23:10:01 UTC 2007

Paul Mason wrote:
> At the beginning of the month I set up my mythtv box to
> shutdown/wakeup automatically using ACPI, mythshutdown and
> mythwelcome. Prior to that it was running 24/7.
> I have a cron job which does a db backup, optimize, xfs defrag etc -
> which is set to run daily at 3am. In order to allow for this I've set
> one of the wake-up periods to 2:45 - 3:45. I've also put a
> "mythshutdown --lock" at the top of my script and a "mythshutdown
> --unlock" at the bottom.
> I use the other wake-up period to have the box awake during my main
> viewing period - 19:00 - 23:59 (the box is both BE and FE).
> So far so good. I set it up following the wiki with very little
> trouble and it's been working perfectly. Or so I thought. It always
> wakes up for recordings, it always wakes up for 19:00 but it hasn't
> been waking up for 2:45. I hadn't realised this until last night
> because often it had been still awake running a job after a recording,
> so the backups were getting done (mostly).
> Anyway I've been looking into this, searching the archives of this
> list, the wiki and elsewhere and I can't find any report of a similar
> problem, or any note of why one of the wakeup periods would work but
> not the other. The script I use to set the wakeup time in the BIOS
> writes to a log, so I can see that it never gets called for the 2:45
> wakeup.
> The only thought I had was whether the wakeup periods need to be in
> order i.e. at the moment period1 is 19:00 - 23:59 and period2 is 02:45
> - 03:45 - perhaps I need to switch them? I'll try that tonight in any
> case.
> I'm running SVN trunk from about a couple months ago. (I also searched
> Trac but didn't find anything on this)
> -- 
> Paul Mason 

I wasn't aware of having to have the wakeup periods in the correct order
but it looks like you could be right. Basically what happens is if  the
start times for both daily wakeup periods has passed for today then the
next wake time will be set to the first daily wakeup time tomorrow even
if the second daily wakeup time is before the first. There should really
be a check to make sure that the earliest daily wakeup time is used.
Swapping the period around should fix things for now.

Paul H.

More information about the mythtv-users mailing list