2
0

Order of task Execution by due-time

This commit is contained in:
glax 2023-07-02 23:10:16 +02:00
parent f9a7828d02
commit 86752c9a7e

View File

@ -54,7 +54,7 @@ public class TaskManager
waitingButExecute.state = TrangaTask.ExecutionState.Enqueued;
}
foreach (TrangaTask enqueuedTask in _allTasks.Where(enqueuedTask => enqueuedTask.state is TrangaTask.ExecutionState.Enqueued))
foreach (TrangaTask enqueuedTask in _allTasks.Where(enqueuedTask => enqueuedTask.state is TrangaTask.ExecutionState.Enqueued).OrderBy(enqueuedTask => enqueuedTask.nextExecution))
{
switch (enqueuedTask.task)
{