Simple program to periodically execute a Sql statement