MS Jobrunner only start when job exists
This commit is contained in:
@@ -66,7 +66,7 @@ Public Class JobRunner
|
||||
{"MSSQL", _mssql},
|
||||
{"Args", oJobConfig.Args}
|
||||
}
|
||||
|
||||
Dim oCountGraphJobs As Int16 = 0
|
||||
Dim oJob = JobBuilder.Create(Of T)().
|
||||
WithIdentity(oJobIdentity).
|
||||
UsingJobData(oJobData).
|
||||
@@ -82,12 +82,13 @@ Public Class JobRunner
|
||||
Await _scheduler.ScheduleJob(oJob, oTrigger)
|
||||
|
||||
_Logger.Info("Job {0} scheduled.", JobName)
|
||||
oCountGraphJobs += 1
|
||||
Else
|
||||
_Logger.Info("Job {0} is disabled.", JobName)
|
||||
End If
|
||||
|
||||
' If StartWithoutDelay is True, start Job after 10 Seconds
|
||||
If oJobConfig.StartWithoutDelay Then
|
||||
If oJobConfig.StartWithoutDelay And oCountGraphJobs > 0 Then
|
||||
Dim oDebugJob = JobBuilder.Create(Of T)().
|
||||
WithIdentity(oJobIdentity & "-DEBUG").
|
||||
UsingJobData(oJobData).
|
||||
@@ -100,6 +101,10 @@ Public Class JobRunner
|
||||
|
||||
_Logger.Info("Job {0} will start in 10 Seconds.", JobName)
|
||||
Await _scheduler.ScheduleJob(oDebugJob, oDebugTrigger)
|
||||
Else
|
||||
If oCountGraphJobs = 0 Then
|
||||
_Logger.Info("No Jobs configured!!")
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user