Changing 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)

jobIDまたはjobUuidパラメータを指定する必要があります。

以下のパラメータを更新できます:

Parameter

Description

script

SQL script (only for the SQL job type)

description

Job description (only for the SQL job type)

parallelRunsAllowed

The number of parallel runs the job can have; If the number is reached, further starts of the particular job will be ignored. Default: 1

retryCounter

Number of retry attempts before the job is set to FAILED state

retryDelay

Delay 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

owner

Name 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

runAs

Job 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

パラメータオーナーとrunAs も、プロシージャ 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

jobNameパラメータは、CData Virtuality Server インスタンス間の同期処理をサポートするためのジョブの一意識別子として機能します。これは、non-system ジョブを作成するすべての手順で指定できます。ジョブ変更手順では指定できません。

その他、注意すべき点をいくつか挙げます:

  • jobNameがプロシージャ呼び出しにない場合は、システムによって自動的に作成されます;
  • また、CData Virtuality Server 起動時に、jobName が設定されていないジョブに遭遇した場合、システムはジョブの名前を作成します;
  • これらの名前は自由に編集したり選択したりできるようには意図されていませんので、よほどの理由がない限り変更することはお勧めしません。

Starting a Job

startJobプロシージャが最も早くジョブを開始する方法です。バックグラウンドで、指定したジョブをすぐに実行するスケジュールを作成します:

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

Job IDまたはJob UUID  を指定する必要があります。

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

Stopping a Job

stopJobプロシージャは、特定のジョブに対して現在実行中のすべてのスケジュールを停止します:

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

Job IDまたはJob UUID  を指定する必要があります。

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

Enabling/Disabling a Job

enableSchedulerJobプロシージャは、ジョブを有効または無効にします:

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

Job IDまたはJob UUID  を指定する必要があります。

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