added pattern to use ScheduledTask