Page 1 of 1

Nanopi-R4S - OpenWRT - How to use RTC ?

Posted: Thu Aug 29, 2024 7:53 pm
by Sergio
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

Re: Nanopi-R4S - OpenWRT - How to use RTC ?

Posted: Thu Jul 03, 2025 4:39 am
by sandragin
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.