arevindh / pihole-speedtest

Pihole Speedtest Mod
https://arevindh.github.io/pihole-speedtest/
MIT License
215 stars 22 forks source link

Scheduler not working #55

Closed P4RI4H closed 3 years ago

P4RI4H commented 3 years ago

Scheduler will not automatically run speedtest. Troubleshooting I've done:

The test works but I cannot for the life of me get it to run automatically.

thexile commented 3 years ago

I concur with @P4RI4H. The scheduler is broken. I have installed pihole-speedtest for a nearly week and no speedtest has been executed automatically yet.

arevindh commented 3 years ago

@thexile @P4RI4H can you post output of sudo crontab -u root -e.

Also, try to change the schedule and recheck the file

thexile commented 3 years ago

no crontab for root - using an empty one

image

smartermoney commented 3 years ago

I will also concur with @P4RI4H and @thexile . I installed speedtest on 2 different pi's and neither will run speedtest. I thought it was something I did till I went searching.

I also ran the suggested code (sudo crontab -u root -e) and got the same thing as @thexile (an empty one so I'm not posting the pic)

I already went through the "change the schedule and recheck" thing before I went searching this out. Both are running the current version Pi-hole v5.1.2 Web Interface v5.1.1 FTL v5.2

arevindh commented 3 years ago

I am working on a fix, please put the following in the file for now.

0 */1 * * * sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh" > /dev/null 2>&

After that try changing the schedule from Web UI and check the file again for changes.

smartermoney commented 3 years ago

The file has been entered. It does change the time in the file when I change it in the GUI. I have it set to test hourly. Will update if it does so

smartermoney commented 3 years ago

running hourly as expected now.

thexile commented 3 years ago

I am working on a fix, please put the following in the file for now.

0 */1 * * * sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh" > /dev/null 2>&

After that try changing the schedule from Web UI and check the file again for changes.

Working great now. Thank you! image

j-broo commented 3 years ago

I have a weird problem. Wondering if anyone else has experienced this. After applying the above fix, the scheduler works again. My settings are for a speed test every hour, however, every night the 4am speedtest fails, with 0 for ping, download and upload. Anyone else found something similar? Any ideas on where to look for clues?

arevindh commented 3 years ago

I have a weird problem. Wondering if anyone else has experienced this. After applying the above fix, the scheduler works again. My settings are for a speed test every hour, however, every night the 4am speedtest fails, with 0 for ping, download and upload. Anyone else found something similar? Any ideas on where to look for clues?

@j-broo Most probably it is your internet connection / router issue . If possbile try running ping around 3:55 - 4:05 and logging the result to a file for debugging in the morning.

There was a issue previously with one of the users of this mod , his internet will get disconnected for 2-3 minutes at 2:00 AM everyday . So he wont get any usefull data for that time.

j-broo commented 3 years ago

I have a weird problem. Wondering if anyone else has experienced this. After applying the above fix, the scheduler works again. My settings are for a speed test every hour, however, every night the 4am speedtest fails, with 0 for ping, download and upload. Anyone else found something similar? Any ideas on where to look for clues?

@j-broo Most probably it is your internet connection / router issue . If possbile try running ping around 3:55 - 4:05 and logging the result to a file for debugging in the morning.

There was a issue previously with one of the users of this mod , his internet will get disconnected for 2-3 minutes at 2:00 AM everyday . So he wont get any usefull data for that time.

Thanks. Turns out my AP was rebooting daily at 4AM. D'oh!