how to run terminal command periodically linux background code example
Example 1: bash for interval
for i in $(seq 1 $END); do echo $i; done
Example 2: bash run a command every x second
while sleep 1; do echo "Hi"; done
for i in $(seq 1 $END); do echo $i; done
while sleep 1; do echo "Hi"; done