云服务器价格_云数据库_云主机【优惠】最新活动-搜集站云资讯

企业网站_对象存储主要兼容什么接口_安全稳定

小七 141 0

企业网站_对象存储主要兼容什么接口_安全稳定

Scenario:

Let consider the scenario where your Transaction Jobs are dependent on your Master Jobs and you have to schedule your transaction jobs such that without completion of master it won’t get executed.Scenario is based on daily execution of both job.

To achieve this follow the below steps –

1) Batch File Export: Take export of batch file for your transaction jobs.

How:

2) Global Variable Declaration: Open your transaction job and add create following global variable.

$STATUS_JOB_DIM datatype as varchar(1)

$JOB_STATUS datatype as varchar(1)

3) Job Modification: Add one script and conditional as follow.

4) Job Status Script: In script use the following command

$STATUS_JOB_DIM = sql(‘DS_SQL_ANYWHERE’,’select status from abc.al_history where service = \’JOB_DIM\’ and  END_TIME in (select max(END_TIME) from abc.al_history where service = \’JOB_DIM\’)  and convert(varchar(8),start_time)=convert(varchar(8),getdate())’);

### use repo name in place of abc.

print($STATUS_JOB_DIM);

if($STATUS_JOB_DIM=’D’)

begin

$JOB_STATUS=’D’;

end

else

begin

$JOB_STATUS=’E’;

end

5) Conditional: Put your Transaction workflow in ELSE clause of conditional and put a Script in THEN clause.

IF Condition:  ($JOB_STATUS = ‘E’ or $JOB_STATUS is NULL)

6) Conditional Script: Within script put the following command:

print(‘Master tables are not populated yet, Cannot Initiate’||$G_JOB_NAME );

#### create a global variable $G_JOB_NAME or Hard code your job name ###

sleep(‘600000’);  ### A pause of 10 min ###

print(exec( ‘Your batch file path,",8));   ### Provide your exported batch file location ###

7) Job Scheduling: Now go to DS management console and schedule your transaction job. At time of execution it will first check the Master Job status if Master Job not completed yet then job will take a pause and re execute itself after 10 min.

,优惠券代理平台哪个好,大数据开发,阿里大数据分析,大数据分析网站,什么是大数据