Skip to main content
Skip table of contents

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:

SQL
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:

ParameterDescription
scriptSQL script (only for the SQL job type)
descriptionJob description (only for the SQL job type)
parallelRunsAllowedThe number of parallel runs the job can have; If the number is reached, further starts of the particular job will be ignored. Default: 1
retryCounterNumber of retry attempts before the job is set to FAILED state
retryDelayDelay in seconds between the retry attempts
runTimeout Individual job timeout in minutes. If no runTimeout is set, configuration set via default value option JOB_RUN_TIMEOUT will be considered for the job; if runTimeout is reached before the job is finished, the job terminates with the INTERRUPTED state
ownerName of the job owner. Owner could be set to a value that is not equal to the current user only by members of admin-role
runAsJob runner. Allowed values: CALLER and OWNER. runAs could be set to a value that is not equal to the current user only by the owner or by members of admin-role

Parameters owner and runAs also can be changed by procedure SYSADMIN.changeResourceOwnerAndExecutor().

jobUuid, owner, and runAs parameters in SYSADMIN.changeJobParameters are available since v4.1

jobUuid parameter in SYSADMIN.changeSQLJob is available since v4.4

SYSADMIN.changeResourceOwnerAndExecutor procedure is available since v4.5

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:

SQL
SYSADMIN.startJob(IN id biginteger, IN startDelay integer, IN queueHandler string, IN uuid string)

The job ID or job UUID must be specified.

uuid parameter in SYSADMIN.startJob is available since v4.1

Stopping a Job

The stopJob procedure stops all currently running schedules for a particular job:

SQL
SYSADMIN.stopJob(IN id biginteger, IN uuid string)

The job ID or job UUID must be specified.

uuid parameter in SYSADMIN.stopJob is available since v4.1

Enabling/Disabling a Job

The enableSchedulerJob procedure enables or disables a job:

SQL
 SYSADMIN.enableSchedulerJob(IN id biginteger, IN enabled boolean NOT NULL, IN uuid string)

The job ID or job UUID must be specified.

uuid parameter in SYSADMIN.enableSchedulerJob is available since v4.4

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.