added periodic purging of scheduled tasks