InitializeJobs will use current DateTime to setup new jobs (Prevents jobs running immediately for new installs).

pull/4/head
Mark McDowall 13 years ago
parent 4ddd1a0f6f
commit 6805a1041b

@ -239,7 +239,9 @@ namespace NzbDrone.Core.Test.ProviderTests.JobProviderTests
timers[0].Interval.Should().Be(fakeJob.DefaultInterval);
timers[0].Name.Should().Be(fakeJob.Name);
timers[0].TypeName.Should().Be(fakeJob.GetType().ToString());
timers[0].LastExecution.Should().HaveYear(2000);
timers[0].LastExecution.Should().HaveYear(DateTime.Now.Year);
timers[0].LastExecution.Should().HaveMonth(DateTime.Now.Month);
timers[0].LastExecution.Should().HaveDay(DateTime.Today.Day);
timers[0].Enable.Should().BeTrue();
}

@ -90,7 +90,7 @@ namespace NzbDrone.Core.Providers.Jobs
TypeName = timer.GetType().ToString(),
Name = timerProviderLocal.Name,
Interval = timerProviderLocal.DefaultInterval,
LastExecution = new DateTime(2000, 1, 1)
LastExecution = DateTime.Now
};
SaveDefinition(settings);

Loading…
Cancel
Save