Power & Source of Big Ideas

Nanopi-R4S - OpenWRT - How to use RTC ?

Moderators: chensy, FATechsupport

Hello,
How can I use RTCWake to put the system into Suspend Mode and set a Wake Time ?
I could not fin any cli command to do this.
Any tips or suggestions would be appreciated.
Thanks
Hello,
You can specify the wake time in seconds from the current time or in a specific timestamp.

Example Command
To suspend the system for a specific duration (e.g., 1 hour) and wake it up, you can use:

Code: Select all

sudo rtcwake -m suspend -l -s 3600


This command will suspend the system for 3600 seconds (1 hour).

Example with Specific Time
If you want to set a specific wake-up time, you can convert your desired wake time into a Unix timestamp. For example:

Code: Select all

sudo rtcwake -m suspend -l -t $(date +%s -d '2025-07-03 10:00:00')


Replace 2025-07-03 10:00:00 with your desired date and time.
:o :o The -s option is great for quick tests, but I think I’ll stick with the -t timestamp method for daily scheduling. I’ve had trouble before when trying to calculate the exact duration, so having an absolute time is easier for me.

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 6 guests