Execute a command every x seconds indefinitely #

As cron's smallest increment is one minute, here are two methods for executing a command every five seconds:
   $ watch -n 5 echo "foo"
   $ while true; do echo "foo"; sleep 5; done

/nix | Sep 29, 2011


Subscribe or visit the archives.