A nifty function for spawning timed background tasks