Managing Jobs
Changing Job Parameters
Depending on the job type (SQL job or some other job), the corresponding stored procedure can be used to change the job parameters:
SYSADMIN.changeSQLJob(IN jobid biginteger, IN script string NOT NULL, IN description string, IN parallelRunsAllowed integer, IN retryCounter integer, IN retryDelay integer, IN runTimeout integer, IN jobUuid string)
SYSADMIN.changeJobParameters(IN jobid biginteger, IN parallelRunsAllowed integer, IN retryCounter integer, IN retryDelay integer, IN runTimeout integer, IN owner string, IN runAs string, IN jobUuid string)
The jobID
or jobUuid
parameter must be specified.
The following parameters can be updated:
Parameter | Description |
---|---|
| SQL script (only for the SQL job type) |
| Job description (only for the SQL job type) |
| The number of parallel runs the job can have; If the number is reached, further starts of the particular job will be ignored. Default: |
| Number of retry attempts before the job is set to |
| Delay in seconds between the retry attempts |
| Individual job timeout in minutes. If no |
| Name of the job owner. Owner could be set to a value that is not equal to the current user only by members of |
| Job runner. Allowed values: |
Parameters owner and runAs also can be changed by procedure SYSADMIN.changeResourceOwnerAndExecutor().
jobName Parameter
The jobName
parameter serves as a job's unique identifier to support synchronization processes between the CData Virtuality Server instances. It can be specified in all procedures creating any of the non-system jobs. It cannot be specified in job-changing procedures.
Here are some other points to keep in mind:
When
jobName
is absent in procedure call, it is created by the system automatically;The system will also create names for jobs on the CData Virtuality Server start when it encounters any job without a
jobName
set;These names are not meant to be freely editable or selectable, and we do not recommend changing them without a very good reason.
Starting a Job
The startJob
procedure is the quickest way to start a job. In the background, it creates a schedule to run the specified job immediately:
SYSADMIN.startJob(IN id biginteger, IN startDelay integer, IN queueHandler string, IN uuid string)
The job ID or job UUID must be specified.
Stopping a Job
The stopJob
procedure stops all currently running schedules for a particular job:
SYSADMIN.stopJob(IN id biginteger, IN uuid string)
The job ID or job UUID must be specified.
Enabling/Disabling a Job
The enableSchedulerJob
procedure enables or disables a job:
SYSADMIN.enableSchedulerJob(IN id biginteger, IN enabled boolean NOT NULL, IN uuid string)
The job ID or job UUID must be specified.