use the "watch" command
watch -n<time_to_loop> <script_to_run>
where time_to_loop is in seconds
Example:
Lets say you have a script called monitor.sh. You can run it every second by doing
Code:
watch -n1 ./monitor.sh
or every 3 minutes by doing
Code:
watch -n180 ./monitor.sh
Good luck!