Python: to execute specific command at some time interval