Job

<< Click to Display Table of Contents >>

Job

Previous pageReturn to chapter overviewNext page

Job Execution

Supported version: 7.1.4 and later

Enter URL in the browser:http://ip:port/bi/Viewer?proc=9&action=runJob&req=800&isAjax=true&fromClient=true&jobPath=job1&param_deptno=10 When the correct parameters are passed, the specified job will be run. This interface does not wait for the scheduled task to be completed, but returns directly after submitting the running request.

Returns the result:

Success

{

    "status": "success",

    "msg": "Job 'Test plan task' has been run"

}

 

Failure

{

    "status": "failure",

    "msg": "Error message"

}

 

Returns a screenshot of the result, as follows:

url17

Note:

1. 7.1.4 , 7.1.5 and 7.5 return binary data when partial error occurs.

2. It is not support calling url to pass parameters to jobs that the types of email task and import data to data mart.

Parameters (the parameters in the following table are variable parameters, the other parameters in the url are fixed values)

Parameter

Type

Whether must

Describe

jobPath

string

must

The complete path of the job. such as "job1"

Parameters at the beginning of  param

 

 

A parameter that begins with param_ in a http request is passed as a run parameter to the scheduled task.

For example, there is a parameter in the scheduler task“deptno”,Then parameters can be passed in this way: param_deptno=10

Multi - valued parameters are separated by using the comma " , " .

 

Get job status

Supported version: 7.1.4 and later

Enter URL in the browser: http://ip:port/bi/Viewer?proc=9&action=getNode&req=800&isAjax=true&fromClient=true&jobPath=job1&param_deptno=10 When the correct parameters are passed, the running state of the specified job is returned.

Returns the result:

[

    {

        "status": "success",  "fireTime": "2017-09-29 12:05:37",

        "path": "Test plan task"

    }

]

Status is the running state of the scheduled task and firetime is the last startup time.

The possible values for status are shown in the following table :

Status

Describe

toRun

Status to run. A running request has been submitted and the scheduled task is being initialized.

running

Running

cancelled

Scheduler tasks cancelled

failure

Scheduled tasks run failure

success

Scheduled tasks run successfully

Returns a screenshot of the result, as follows:

url18

Parameters (the parameters in the following table are variable parameters, the other parameters in the url are fixed values)

Parameter

Type

Whether must

Describe

jobPath

string

must

The complete path of the job. such as"job1"

 

Cancel Job Execution

Supported version: 7.1.4 and later

Enter URL in the browser:http://ip:port/bi/Viewer?proc=9&action=stopJob&req=800&isAjax=true&fromClient=true&jobPath=job1 When the correct parameter is passed, the specified job that is running will be canceled.

Returns the result:

Success

[

    {

        "status": "Success to stop",

        "path": "Test plan task"

    }

]

 

Failure

[

    {

        "status": " Failure to stop",

        "path": "Test plan task"

    }

]

 

Cancel a job that is not running

[]

 

Returns a screenshot of the result, as follows:

url19

Parameters (the parameters in the following table are variable parameters, the other parameters in the url are fixed values)

Parameter

Type

Whether must

Describe

jobPath

string

must

The complete path of the job.such as"job1"