Here's the situation: I'm using SManager to run a very simple shell script on a regular schedule; all it does is run a ffmpeg command line to save an audio stream from a URL. If I run the script manually, it works great. If I schedule it for, say, 15 minutes ahead, then put the device to sleep, it works great. But if it's been sleeping for hours, like overnight, the script runs but ffmpeg reports that it can't access the network. Only difference that I can see is how long the device has been asleep, but I haven't done enough tests yet to figure out how long it has to be asleep before the network becomes unwakeable.
- I've configured my scripts in SManager to get a wakelock and to run as root.
- Wifi is set to never sleep.
- I've tried deleting the wifi network and reconnecting.
- Added
sleep 30
at the top of my script in order to give SManager plenty of time for its wakelock to wake up the network. - Added
ip link set wlan0 up
to top of script to wake up the network. - Tried to install Kernel Audiutor to see if has any useful mods, but for some reason it fails to start on my device.
- Tried a Wifi-keepalive app.
- I have no "battery saver" apps of any kind installed.
Device is a rooted 5th generation Amazon Fire tablet with Lollipop Nexus ROM (which predates Doze, so that's not the issue).
Does this make sense to anyone; ideas about how to solve it?