diff --git a/SimpleScheduler/IJobInfo.cs b/SimpleScheduler/IJobInfo.cs index 1ffe349..ca4f2f8 100644 --- a/SimpleScheduler/IJobInfo.cs +++ b/SimpleScheduler/IJobInfo.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; namespace SimpleScheduler { @@ -11,6 +12,8 @@ public interface IJobInfo bool StopOnError { get; } int RepetitionIntervalTime { get; } string Schedule { get; } + DateTimeOffset LastRunAt { get; } + bool IsSelfExecute { get; } Task InitializeSchedule(); } } diff --git a/SimpleScheduler/JobInfo.cs b/SimpleScheduler/JobInfo.cs index c9b57c7..164848a 100644 --- a/SimpleScheduler/JobInfo.cs +++ b/SimpleScheduler/JobInfo.cs @@ -70,6 +70,10 @@ private TimeSchedule GetTimeSchedule() }; } + public DateTimeOffset LastRunAt { get; private set; } + + public bool IsSelfExecute { get; } = true; //TODO: create a pool for not self execute jobs (job without a loop to running itself) + private string JobType { get; } private Type _objectType;