From b049be9d8388d138e88058999b454ec3e8357444 Mon Sep 17 00:00:00 2001 From: Jon Welfringer <7365166+W6HBR@users.noreply.github.com> Date: Thu, 4 Sep 2025 21:44:14 -0700 Subject: [PATCH] Change IsStarted to follow IsEnabled value upon startup. Changes behavior of IsStarted to follow the same value of IsEnabled. --- Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs b/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs index 655c7b20..349ce812 100644 --- a/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs +++ b/Oqtane.Server/Infrastructure/Jobs/HostedServiceBase.cs @@ -252,8 +252,8 @@ namespace Oqtane.Infrastructure Job job = jobs.GetJobs().Where(item => item.JobType == jobTypeName).FirstOrDefault(); if (job != null) { - // reset in case this job was forcefully terminated previously - job.IsStarted = true; + // reset in case this job was enabled and forcefully terminated previously + job.IsStarted = job.IsEnabled; job.IsExecuting = false; jobs.UpdateJob(job); }