I'd like to have a script running in the background, which pings a remote host every 10 seconds or so. The script looks something like this:
nohup ping -i 10 www.google.com &
I'm able to initiate the script with an @reboot cron job, following this suggestion. However, the ping doesn't happen in the background and I don't see the script running when I poke around with ps
.
Any suggestions much appreciated. Thanks.
type
. The command should be/usr/bin/nohup /bin/ping -i 10 www.google.com &
.BUT! is name resolution (dnsmasq
) up and running when@reboot
runs? Try@reboot host www.google.com
. I have a different suggestion, adapt this: https://github.com/waltinator/net-o-matic.git - Watch for (WiFi) network going down, then do a user-specified thing to fix it. – waltinator Dec 10 '19 at 23:05