Closed raidoo9 closed 4 years ago
Just edit the crontab and change to whatever you like.
Ok so in sudo crontab I have set
0 0 * sh "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh" >> /logs/speedtest 2>&1
0 6 * sh "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh" >> /logs/speedtest 2>&1
and ensure it is set to disable on the schedule settings page?
When I try to run speedtest.sh:
speedtest.sh: 47: speedtest.sh: source: not found speedtest.sh: 59: speedtest.sh: [[: not found speedtest.sh: 65: speedtest.sh: Syntax error: "(" unexpected
Thanks
Try this :
sudo crontab -e
0 0,6 * * * sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh" > /dev/null 2>&1
Generate crontab here : https://crontab-generator.org/
Enter sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh"
in command column.
Thanks, unfortunately still getting same errors as above. Happens as well I just just try to execute the script directly. Any idea what line 47, 59 and 65 in the .sh do or why I could be getting this error?
Are you still using sh
? try using bash
.
Thanks!
On schedule it gives you options, every 1 hour, every 2 hours etc.
Is there and option to set it to run at specific times, eg. 00:00 & 06:00
Thanks