SysCancelUserScriptBatchIfExists
Cancels a user script batch, if it exists and is in Scheduled, Queued or Running state. Silently fails, if job does not exist, just returns null and success, instead of an error.
Service | Operation |
---|---|
script | SYS_CANCEL_USER_SCRIPT_BATCH_IF_EXISTS |
Method Parameters
Parameter | Description |
---|---|
jobId | The id of the job to cancel. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var jobId = "idsfihihfuvhvuh";
var scriptProxy = bridge.getScriptServiceProxy();
var postResult = scriptProxy.sysCancelUserScriptBatchIfExists(jobId);
if (postResult.status == 200) {
// Success!
}
{
"service": "script",
"operation": "SYS_CANCEL_USER_SCRIPT_BATCH_IF_EXISTS",
"data":
{
"jobId": "idsfihihfuvhvuh"
}
}
JSON Response
{
"data": {
"cancelled": 1
},
"apiCount": 1,
"totalCount": 0,
"status": 200
}