The task function will be called every 10 seconds.