/// <summary> /// Returns whether or not the service is suspected to have /// crashed. This is based on whether 2 cycle times have passed /// since the last run or 2 heartbeat cycle times have passed /// since the last heartbeat. /// </summary> /// <returns></returns> public bool IsCrashSuspected() { return (Math.Abs(LastRunTime.Subtract(_serverTime).TotalMinutes) > RunIntervalMinutes * 2 || // More than 2 cycles times have passed since last run time Math.Abs(LastHeartbeat.Subtract(_serverTime).TotalMinutes) > EngineBase.HEARTBEAT_INTERVAL.TotalMinutes * 2); // More than 2 heartbeat cycle times have passed since last heartbeat }
public int CompareTo(SchedulerSyncJob other) { if (Status == other.Status || (Status != "Idle" && other.Status != "Idle")) { return(LastRunTime.CompareTo(other.LastRunTime)); } else if (Status == "Idle") { return(-1); } else { return(1); } }
public void Increment() { LastRunTime = NextRunTime; NextRunTime = LastRunTime.AddMilliseconds(Interval); }
public void Increment() { LastRunTime = NextRunTime; NextRunTime = LastRunTime.AddMilliseconds(Schedule); }
public void Increment() { LastRunTime = NextRunTime; NextRunTime = LastRunTime.Add(TimeBetweenExecutions); }
public void Increment() { LastRunTime = NextRunTime; NextRunTime = LastRunTime.AddMilliseconds(PeriodMS); }