Re-execute a command by a given time interval in bash
<p>Is there a way to Re-execute a command by a given time interval in bash?
I want Weather to be re-executed every 30 min.
here is example of my script:</p>

<pre><code>#!/bin/bash

#Show time, date and clickable calendar
clock() {
    curtime=`date '+%I:%M'` 
    curdate=`date '+%d-%m-%Y'`
    echo "%{A:/usr/bin/gsimplecal:}%{T2} %{T1}$curdate%{A} %{T2} %{T1}$curtime"
}


volume1() {
    amixer get Master | sed -n 'N;s/^.*\[\([0-9]\+%\).*$/\1/p'
 }

#weather
weather(){
  curl -s "$(curl -s 'http://www.wunderground.com/' | sed -n '/Full Forecast/{s#[^"]*"\([^"]*\)".*#http://www.wunderground.com\1#p}')" | sed -n '/"curCond"/{ s#.*wx-value[^&gt;]*&gt;\([^&lt;]*\)&lt;.*#\1#; h }; /"curTemp"/{ N; N; N; s#.*wx-value[^&gt;]*&gt;\([^&lt;]*\)&lt;.*wx-unit[^&gt;]*&gt;&amp;deg;\(.\).*#\1°\2 #; G; s#\n##; p }'
    echo $weather
    }

while :; do

echo "%{B#DDecf0f1}%{F#2c2c2c}%{T2}%{l}    $(groups)    %{T1}$(curwin) %{r}%{F#2C2C2C}  $(weather) $(space)|$(space) VOL: $(volume1) $(space)|$(space) $(uptime)  $(space)|$(space)   $(clock) %{A2}$(curwin)"

sleep 1 #sleep of mainloop

done
</code></pre>