07-23-2022, 02:56 AM | #1 |
Addict
Posts: 203
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
help needed - sleep cmd issue in .sh script
Having issues with a script that I want to sleep for a certain amount of time before it starts the next step but I seem to be getting mixed results. For example if I set sleep to 1 second it seems fine. Set to 30 seconds it can take 1m20s to end the script or even 3min. I am using NickelDBus and :cmd_spawn :quiet in NickelMenu to start the script. Would this be the script or am I going about this the wrong way?
I stripped my original script and tried testing with the below. Code:
#!/bin/sh #Version 1.0 sleep testing #Define functions Func_LogApp01(){ LogVar01="$1" LogDateStamp01=`date '+%d/%m/%Y - %T'` LogAppOutput01="${LogVar01} ${LogDateStamp01}" echo $LogAppOutput01 >> $LogFile01 } #Define variables LogFile01=/mnt/onboard/.adds/WifiTimer.txt TimerDurSec01=30 echo -e >> $LogFile01 Func_LogApp01 "-->Begin:" sleep $TimerDurSec01 qndb -m mwcToast 2000 "Timer ended..." Func_LogApp01 "-->End:" echo -e >> $LogFile01 |
07-23-2022, 02:14 PM | #2 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Nickel will put the device into standby after ~6 seconds of inactivity when the device is not connected to a power source and Wi-Fi is down.
(c.f., https://github.com/NiLuJe/NanoClock/...ck.ini#L48-L53) So, yeah, that won't work . |
Advert | |
|
07-23-2022, 06:36 PM | #3 |
Addict
Posts: 203
Karma: 20980
Join Date: Oct 2020
Device: Kobo Aura One, Aura HD (R.I.P.) :(
|
Thanks, excellent info.
Very much appreciate the reply! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting An issue with Arabic script in Kindle Paperwhite | simurq | Amazon Kindle | 2 | 08-25-2020 07:36 AM |
Execute a shell script triggered by sleep event | ndriver | Kobo Developer's Corner | 0 | 07-20-2020 04:34 PM |
Glo HD Sleep bottton issue | kangaro | Kobo Reader | 2 | 05-08-2019 07:52 PM |
Glo Sleep cover issue | jhuynh | Kobo Reader | 17 | 01-04-2013 06:23 PM |
Before sleep...take screenshot and copy into screensavers..help needed | max99 | Kindle Developer's Corner | 10 | 08-31-2011 03:03 PM |