Click or drag to resize

IJobManagerService Interface

Job Management Service

Namespace: SanteDB.Core.Jobs
Assembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntax
public interface IJobManagerService : IServiceImplementation

The IJobManagerService type exposes the following members.

Properties
 NameDescription
Public propertyJobs Gets the status of all jobs
Public propertyServiceName Gets the service name
(Inherited from IServiceImplementation)
Top
Methods
 NameDescription
Public methodCode exampleAddJob(IJob, JobStartType) Add a job to the execution manager
Public methodAddJob(IJob, TimeSpan, JobStartType) Add a job to the job manager
Obsolete
Public methodClearJobSchedule Clear the schedule of a job.
Public methodGetAvailableJobs Get all available jobs, in the current application domain
Public methodGetJobInstance(Guid) Get this manager's instance of a job
Public methodGetJobInstance(Type) Get the job instance from jobType
Public methodGetJobSchedules Get the schedule for the specified job
Public methodIsJobRegistered Returns true if the job is registered
Public methodRegisterJob Adds a job by type to the job manager
Public methodSetJobSchedule(IJob, TimeSpan) Schedule a job to repeat on an interval
Public methodSetJobSchedule(IJob, DayOfWeek, DateTime) Schedule a job to start at a specific time with a specific repetition
Public methodStartJob(IJob, Object) Starts the specified job
Public methodStartJob(Type, Object) Start a job by registered type
Top
Remarks

In SanteDB, developers can create IJob implementations which represent background jobs for the system. Uses of these classes involve:

  • Performing routine maintenance tasks like compression, backup, etc.
  • Performing indexing tasks or managing long-running tasks
  • Exposing packaged batch operations to users (who can run them manually from the UI)

The job manager is the service which manages the master list of IJob instances and allows other plugins to register new jobs, start jobs, and even schedule job execution based on a schedule or interval.

See Also