fixed jobs running all the time.

This commit is contained in:
kay.one 2013-03-02 12:14:18 -08:00
commit 77eedf448e
5 changed files with 63 additions and 27 deletions

View file

@ -33,7 +33,7 @@ namespace NzbDrone.Core.Jobs
public IList<JobDefinition> GetPendingJobs()
{
return Queryable.Where(c => c.Enable && c.LastExecution < DateTime.UtcNow.AddMinutes(c.Interval)).ToList();
return Queryable.Where(c => c.Enable && c.LastExecution < DateTime.Now.AddMinutes(-c.Interval)).ToList();
}
public void Init()