Пример #1
0
        public void ScheduleTask()
        {
            IEndpointInstance endpointInstance = null;

            #region ScheduleTask
            // To send a message every 5 minutes
            IBusSession busSession = endpointInstance.CreateBusSession();
            busSession.ScheduleEvery(TimeSpan.FromMinutes(5), b => b.Send(new CallLegacySystem()));

            // Name a schedule task and invoke it every 5 minutes
            busSession.ScheduleEvery(TimeSpan.FromMinutes(5), "MyCustomTask", SomeCustomMethod);

            #endregion
        }