Update ScheduledAgent.cs