Kodi Community Forum

Full Version: Cron to wake/suspend help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone. I'm currently having trouble with rtcwake.

My goal is to have my system wake at 01:00 am and then suspend at 07:00 am, everyday.

My cron for wake is:

Code:
rtcwake -m no -u -t $(date +%s -d 'tomorrow 20:00')

Now, you may be wondering "why is your time set to 20:00?" Well, that's the first part of my mystery. The output of this command is:

Code:
rtcwake: wakeup using /dev/rtc0 at Fri Jan 17 00:59:51 2014

So, as you can see, the output of rtc is 5 hours plus of the system time. I'm sure this to do with UTC and system time something or other, but it's beyond my understanding.

Part 2: I use webmin to manage my server. Before some one asks me why or to stop using it, please know that I just like it and I have no intention of not using it. That doesn't mean I'm not open to using terminal to set this particular wake/suspend schedule, but I'm currently trying to do it with Webmin.

Now that you know I use Webmin, I want you to know that I use it to schedule "pm-suspend" to run at the scheduled hour of "7". Now, I assume that schedule operates on system time, so maybe this means it will run at 12 noon. Setting it to run at "2" would probably be a patchwork solution.



So the question is two-fold:

Can I make system time/hardware time to match UTC?

Or, is there a smarter way to go about this?

I've done a million searches on this and it seems that there's tons of information available, but I don't have the knowledge to decipher it.

Thanks for any help.