Change StartJob to check if job is enabled

This commit is contained in:
Jon Welfringer
2025-09-04 21:47:51 -07:00
committed by GitHub
parent b049be9d83
commit 1ea76d06d1

View File

@ -113,6 +113,13 @@ else
} }
private async Task StartJob(int jobId) private async Task StartJob(int jobId)
{
Job _job = await JobService.GetJobAsync(jobId);
if (!_job.IsEnabled)
{
AddModuleMessage(Localizer["Message.Job.Disabled"], MessageType.Warning);
}
else
{ {
try try
{ {
@ -128,6 +135,7 @@ else
AddModuleMessage(Localizer["Error.Job.Start"], MessageType.Error); AddModuleMessage(Localizer["Error.Job.Start"], MessageType.Error);
} }
} }
}
private async Task StopJob(int jobId) private async Task StopJob(int jobId)
{ {