Hello,
just a happy update. It seems to work for me - even so I still need to run it for several days to test stability and runtime.
Basic idea:
- wakeup every hour
- execute Cron (at 1 min after the hour) to update display
- send to sleep until next full hour
As the cron is only executed between 7am and 8pm on my side, I had to go a little extra way. basically I am dividing the timestamp by 3600 seconds to geht the last full hour and then up to the next execution...
this is how my update.sh looks like (which is executed by cron)
Quote:
sh /mnt/onboard/wifiup.sh
....update display...
sh /mnt/onboard/wifidn.sh
h=`date +%H`
timestp=$((`date +%s`/3600))
if [ "$h" -ge 20 ]; then
multi=24-$h
let timestp+=7
let timestp+=$multi
elif [ "$h" -lt 7 ]; then
multi=7-$h
let timestp+=$multi
else
let timestp+=1
fi
timestp=$((timestp * 3600))
/mnt/onboard/busybox_kobo rtcwake -t $timestp
|