This post has been re-written now the problem is understood
Hello,
I have a problem where an fcron job to run speedtest-cli
fails when run from fcron if a root shell hasn’t been open in the past ~15 minutes.
- If a root shell is open or has been only disconnected recently, it works without problem
- This happens with both the Pakfire
speedtest-cli
add-on version AND a copy directly from GitHub - sivel/speedtest-cli: Command line interface for testing internet bandwidth using speedtest.net - The problem is not with the fcron syntax or the file permissions
- The problem occurs when I do not nominate a speed test server
- fcrontab syntax is
30 01 * * * /usr/local/bin/<myscript>.sh
- The script runs without problem and it calls
/usr/bin/python3 /usr/bin/speedtest-cli --no-upload --secure --csv
but through debugging I can see that it always fails with error:Result is: ERROR: Unable to connect to servers to test latency
.
I’m unable to find why this script works when I have an active session, but fails when there isn’t any.
If you have any ideas please let me know!
Thank you!