Namespace: Consultingwerk.SmartFramework.Scheduler.Runtime
Class 
SchedulerRuntime Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

/*&GLOBAL-DEFINE SmartLockGlobalSharedVariables SmartLockGlobalSharedVariables



Top Method Summary
Options Name Purpose
AbortJob (character) Aborts a scheduler job that is stuck in the Running state
Execute () Performs execution of scheduler jobs
ExecuteSchedulerJob (SchedulerJobDatasetModel, SchedulerJobStatusDatasetModel) Executes a single SchedulerJob instance
InvokeSchedulerJobCommand (ISchedulerJobCommand, Object) Calls the Start method of the
LOGICAL IsCancelled () Tests if the current Job is cancelled
LOGICAL IsPlannedAfterFinish (character) Returns if the next iteration of a recurring job is planned after the job has finished
ReturnJobToQueue (character, datetime-tz) Returns a job instance that has been claimed for execution to the queue
ScheduleNextIteration (character) Plans the next iteration of a recurring job after the job has been executed
SetJobStatus (SmartSchedulerJobStatusTableModel, SchedulerJobStatusEnum) Sets the Job Status and raises the JobStatusChanged event
UpdateJobStatus (character) Updates the Job's status
UpdateJobStatus (character, integer) Updates the Job's status
UpdateJobStatus (integer) Updates the Job's status

Top Constructor Summary
Options Name Purpose
SchedulerRuntime () Protected default constructor of the SchedulerRuntime class

Top Event Summary
Options Name Purpose
JobCancelled (JobStatusEventArgs) Raised when a job status is set to Cancelled
JobFailed (JobStatusEventArgs) Raised when a job status is set to Failed
JobFinished (JobStatusEventArgs) Raised when a job status is set to Finished
JobRunning (JobStatusEventArgs) Raised when a job status is set to Running
JobStatusChanged (JobStatusEventArgs) Raised when the job status changes
PostJobExecution (JobStatusEventArgs) Raised after job execution
PreJobExecution (PreJobExecutionEventArgs) Raised before job execution

Top Property Summary
Options Name Purpose
LOGICAL Active
INTEGER KeepRunning
INTEGER PauseBetweenPolling
CHARACTER QueueCode
CHARACTER SchedulerJobStatusGuid
LOGICAL Verbose


Method Detail
Top

AbortJob (character)

Purpose: Aborts a scheduler job that is stuck in the Running state
Notes: Intended for jobs that are shown as Running but are no longer
actually executing (e.g. after a scheduler crash). The job status
record is set to Finished with a status text indicating that the
job was aborted. When the job is recurring and no further iteration
has been planned yet, the next iteration is scheduled just as if
the job had finished regularly.
Executing this method requires access to the SchedulerAbortJob
security token

Parameters:
pcSchedulerJobStatusGuid CHARACTER
The GUID of the SmartSchedulerJobStatus record of the job to abort
Top

Execute ()

Purpose: Performs execution of scheduler jobs
Notes:

Top

ExecuteSchedulerJob (SchedulerJobDatasetModel, SchedulerJobStatusDatasetModel)

Purpose: Executes a single SchedulerJob instance
Notes: The job status record has already been claimed (set to Running)
by GetNextAvailableJobStatus. Every path either executes the job
(Finished, Failed or Cancelled), cancels it (PreJobExecution) or
returns it to the Scheduled state (rescheduled by PreJobExecution,
deferred by ICheckReadyToExecute). Errors while preparing the job
(deserializing the job command or parameter, CheckReadyToExecute,
planning the next iteration) mark the job as Failed instead of
leaving it in the Running state.
The next iteration of a recurring job is planned when the job
starts - or after the job has finished when the job plan computes
the interval relative to the end time of the previous execution.

Parameters:
poJob Consultingwerk.SmartFramework.Scheduler.SchedulerJobDatasetModel
The SchedulerJobDatasetModel with the job to execute
poJobStatus Consultingwerk.SmartFramework.Scheduler.SchedulerJobStatusDatasetModel
The SchedulerJobStatusDatasetModel with the job instance to execute
Top

InvokeSchedulerJobCommand (ISchedulerJobCommand, Object)

Purpose: Calls the Start method of the
Notes: Moved outside of ExecuteSchedulerJob for ability to handle
STOP conditions

Parameters:
poJobCommand Consultingwerk.SmartFramework.Scheduler.ISchedulerJobCommand
The ISchedulerJobCommand instance to execute
poParameter Progress.Lang.Object
The parameter object for the job instance
Top

LOGICAL IsCancelled ()

Purpose: Tests if the current Job is cancelled
Notes: When the Job was cancelled, the SmartSchedulerJobStatus record
will be set to the Cancelled status immediately. The calling
routine is expected to leave promptly

Returns LOGICAL
Logical value indicating if the Job was cancelled
Top

LOGICAL IsPlannedAfterFinish (character)

Purpose: Returns if the next iteration of a recurring job is planned after
the job has finished
Notes: True for interval plans that compute the interval relative to the
end time of the previous execution - the end time is only known
after the job has finished. All other plans are planned when the
job starts

Parameters:
pcSchedulerJobPlanGuid CHARACTER
The GUID of the SmartSchedulerJobPlan record of the job
Returns LOGICAL
Logical value indicating if the next iteration is planned after the job has finished
Top

ReturnJobToQueue (character, datetime-tz)

Purpose: Returns a job instance that has been claimed for execution to the
queue
Notes: GetNextAvailableJobStatus sets the job status to Running when it
claims a job. A job that is not executed now (rescheduled by the
PreJobExecution event, deferred by ICheckReadyToExecute) is set back
to Scheduled, otherwise the scheduler would never pick it up again

Parameters:
pcSchedulerJobStatusGuid CHARACTER
The GUID of the SmartSchedulerJobStatus record of the job
pdtScheduleDateTime DATETIME-TZ
The date and time the job is scheduled for
Top

ScheduleNextIteration (character)

Purpose: Plans the next iteration of a recurring job after the job has
been executed
Notes: An error is reported in the scheduler output only - the job has
already been executed, and the error must not end the scheduler
runtime

Parameters:
pcSchedulerJobStatusGuid CHARACTER
The GUID of the SmartSchedulerJobStatus record of the executed job
Top

SetJobStatus (SmartSchedulerJobStatusTableModel, SchedulerJobStatusEnum)

Purpose: Sets the Job Status and raises the JobStatusChanged event
Notes:

Parameters:
poSmartSchedulerJobStatus Consultingwerk.SmartFramework.Scheduler.SmartSchedulerJobStatusTableModel
The SmartSchedulerJobStatusTableModel representing the current job
poJobStatus Consultingwerk.SmartFramework.Scheduler.SchedulerJobStatusEnum
The status to set
Top

UpdateJobStatus (character)

Purpose: Updates the Job's status
Notes:

Parameters:
pcStatusText CHARACTER
The status text
Top

UpdateJobStatus (character, integer)

Purpose: Updates the Job's status
Notes:

Parameters:
pcStatusText CHARACTER
The status text
piPercentFinished INTEGER
The percentage to indicate the job completion
Top

UpdateJobStatus (integer)

Purpose: Updates the Job's status
Notes:

Parameters:
piPercentFinished INTEGER
The percentage to indicate the job completion


Constructor Detail
Top

SchedulerRuntime ()

Purpose: Protected default constructor of the SchedulerRuntime class
Notes: Disallow instance creation



Event Detail
Top

JobCancelled (JobStatusEventArgs)

Purpose: Raised when a job status is set to Cancelled
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.JobStatusEventArgs
The JobStatusEventArgs with the details of this event
Top

JobFailed (JobStatusEventArgs)

Purpose: Raised when a job status is set to Failed
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.JobStatusEventArgs
The JobStatusEventArgs with the details of this event
Top

JobFinished (JobStatusEventArgs)

Purpose: Raised when a job status is set to Finished
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.JobStatusEventArgs
The JobStatusEventArgs with the details of this event
Top

JobRunning (JobStatusEventArgs)

Purpose: Raised when a job status is set to Running
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.JobStatusEventArgs
The JobStatusEventArgs with the details of this event
Top

JobStatusChanged (JobStatusEventArgs)

Purpose: Raised when the job status changes
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.JobStatusEventArgs
The JobStatusEventArgs with the details of this event
Top

PostJobExecution (JobStatusEventArgs)

Purpose: Raised after job execution
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.JobStatusEventArgs
The JobStatusEventArgs with the details of this event
Top

PreJobExecution (PreJobExecutionEventArgs)

Purpose: Raised before job execution
Notes:

Parameters:
e Consultingwerk.SmartFramework.Scheduler.Runtime.PreJobExecutionEventArgs
The PreJobExecutionEventArgs with the details of this event


Property Detail
Top

LOGICAL Active


Returns LOGICAL
Top

INTEGER KeepRunning


Returns INTEGER
Top

INTEGER PauseBetweenPolling


Returns INTEGER
Top

CHARACTER QueueCode


Returns CHARACTER
Top

CHARACTER SchedulerJobStatusGuid


Returns CHARACTER
Top

LOGICAL Verbose


Returns LOGICAL


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       24.11.2026 10:08:14