You can call the DeleteScheduledSQL operation to delete a Scheduled SQL job.
Note
The Simple Log Service SDK for Scheduled SQL is no longer updated. Use the Alibaba Cloud SDK to manage Scheduled SQL.

Prerequisites
Simple Log Service is activated. For more information, see Enable Log Service.
Simple Log Service SDK for Java is initialized. For more information, see Initialize Simple Log Service SDK for Java.
Parameters
Request parameters
|
Name |
Type |
Required |
Description |
Example |
|
project |
String |
Yes |
The name of the project. |
ali-test-project |
|
jobName |
String |
Yes |
The unique name of the Scheduled SQL job. |
sql-123456789-123456 |
Response parameters
See DeleteScheduledSQL.
Sample code
import com.alibaba.fastjson.JSONObject;
import com.aliyun.openservices.log.Client;
import com.aliyun.openservices.log.exception.LogException;
import com.aliyun.openservices.log.request.DeleteScheduledSQLRequest;
import com.aliyun.openservices.log.response.DeleteScheduledSQLResponse;
public class DeleteScheduledSQL {
static String accessId = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
static String accessKey = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET");
static String host = "cn-hangzhou.log.aliyuncs.com";
static Client client = new Client(host, accessId, accessKey);
public static void main(String[] args) throws LogException {
String project = "ali-test-project";
String jobName = "sql-123456789-123456";
DeleteScheduledSQLResponse scheduledSQLResponse = client.deleteScheduledSQL(new DeleteScheduledSQLRequest(project, jobName));
System.out.println(JSONObject.toJSONString(scheduledSQLResponse));
}
}
References
-
For more information about Scheduled SQL API operations, see the following topics:
该文章对您有帮助吗?