|
|
|
@ -199,7 +199,16 @@ namespace NzbDrone.Core.Jobs
|
|
|
|
|
if (scheduledTask != null && message.Command.Body.UpdateScheduledTask)
|
|
|
|
|
{
|
|
|
|
|
_logger.Trace("Updating last run time for: {0}", scheduledTask.TypeName);
|
|
|
|
|
_scheduledTaskRepository.SetLastExecutionTime(scheduledTask.Id, DateTime.UtcNow, message.Command.StartedAt.Value);
|
|
|
|
|
|
|
|
|
|
var lastExecution = DateTime.UtcNow;
|
|
|
|
|
var startTime = message.Command.StartedAt.Value;
|
|
|
|
|
|
|
|
|
|
_scheduledTaskRepository.SetLastExecutionTime(scheduledTask.Id, lastExecution, startTime);
|
|
|
|
|
|
|
|
|
|
var cached = _cache.Find(scheduledTask.TypeName);
|
|
|
|
|
|
|
|
|
|
cached.LastExecution = lastExecution;
|
|
|
|
|
cached.LastStartTime = startTime;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|