Poll DB from script

Hi!

Im trying to make a program that polls a mysqlDB every 5 minutes.
the poll checks a scheduletable in the dB and exicutes a function if
there was a "go" in the scheduletable, and if it retrives a "no go" from the table
it should just wait for another 5 minutes before re polling the DB,

How would you guys do the "Poll Loop?".. im totaly stuck on this.
would sleep(300) do it?
Topic archived. No new replies allowed.