SysCancelScheduledScriptIfExists
Cancels a previously scheduled script, if it exists and is still in Scheduled state. Silently fails, if job does not exist, just returns null and success, instead of an error.
Service | Operation |
---|---|
script | SYS_CANCEL_SCHEDULED_SCRIPT_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.sysCancelScheduledScriptIfExists(jobId);
if (postResult.status == 200) {
// Success!
}
{
"service": "script",
"operation": "SYS_CANCEL_SCHEDULED_SCRIPT_IF_EXISTS",
"data":
{
"jobId": "idsfihihfuvhvuh"
}
}
JSON Response
{
"data": {
"cancelled": 1
},
"apiCount": 1,
"totalCount": 0,
"status": 200
}