| IJobManagerServiceAddJob Method (IJob, JobStartType) |
Add a job to the execution manager
Namespace:
SanteDB.Core.Jobs
Assembly:
SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntax void AddJob(
IJob jobType,
JobStartType startType = JobStartType.Immediate
)
Sub AddJob (
jobType As IJob,
Optional startType As JobStartType = JobStartType.Immediate
)
void AddJob(
IJob^ jobType,
JobStartType startType = JobStartType::Immediate
)
abstract AddJob :
jobType : IJob *
?startType : JobStartType
(* Defaults:
let _startType = defaultArg startType JobStartType.Immediate
*)
-> unit
Parameters
- jobType
- Type: SanteDB.Core.JobsIJob
The type of job to add - startType (Optional)
- Type: SanteDB.Core.JobsJobStartType
The type of start the job should take
Examples var jobManager = ApplicationServiceContext.Current.GetService<IJobManager>();
jobManager.AddJob(new HelloWorldJob(), startType = JobStartType.Never);
See Also