diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index db5e17e..20a450b 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -223,7 +223,7 @@ public class JobBoss : GlobalBase queueHead.ResetProgress(); jobQueue.Dequeue(); ExportJobsList(); - Log($"Next job in {jobs.OrderBy(job => job.nextExecution).First().nextExecution.Subtract(DateTime.Now)}"); + Log($"Next job in {jobs.MinBy(job => job.nextExecution)?.nextExecution.Subtract(DateTime.Now)}"); }else if (queueHead.progressToken.state is ProgressToken.State.Standby) { Job[] subJobs = jobQueue.Peek().ExecuteReturnSubTasks().ToArray();