Candor.Tasks.RepeatingWorkerRoleTask.OnStart C# (CSharp) Method

OnStart() public method

Starts this worker roles work loop, typically with a timer, and then returns immediately.
public OnStart ( ) : void
return void
        public override void OnStart()
        {
            if (_disposed)
                throw new ObjectDisposedException("WorkerRole");
            LogProvider.WarnFormat("'{0}' is starting.", Name);

            try
            {
                CheckIn();
                if (WaitingPeriodSeconds < 1)
                {
                    LogProvider.WarnFormat("'{0}' is configured to never run (WaitingPeriodSeconds must be at least 1)", Name);
                    return;
                }
                IsRunning = true;
                _nextIterationTimestamp = DateTime.UtcNow.AddSeconds(WaitingPeriodSeconds);
                StartTimer();
                LogProvider.InfoFormat("'{0}' has started.", Name);
            }
            catch (Exception ex)
            {
                LogProvider.ErrorFormat("Unhandled exception starting task '{0}'", ex, Name);
                throw;
            }
        }