All Products
Search
Document Center

Simple Log Service:Delete a scheduled SQL job

Last Updated:Sep 03, 2025

Call the DeleteScheduledSQL operation to delete a scheduled SQL job.

Note

The Simple Log Service software development kit (SDK) no longer updates APIs for scheduled SQL jobs. Use Alibaba Cloud SDK to manage scheduled SQL jobs.

image

Prerequisites

Parameters

def delete_scheduled_sql(self, project_name, job_name):

Request parameters

Name

Type

Required

Description

Example

project_name

String

Yes

The name of the project.

demo-test-project

job_name

String

Yes

The name of the existing scheduled SQL job.

test-001

Response parameters

For more information about the response parameters, see DeleteScheduledSQL - Delete a scheduled SQL job.

Sample code

import os
from aliyun.log import LogClient


def main():
    # This example obtains the AccessKey ID and AccessKey secret from environment variables.
    accessKeyId = os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', '')
    accessKey = os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', '')

    # The endpoint of Simple Log Service.
    endpoint = "cn-hangzhou.log.aliyuncs.com"
    project_name = "demo-test-project"
    job_name = "test-001"

    client = LogClient(endpoint, accessKeyId, accessKey, "")
    res = client.delete_scheduled_sql(project_name, job_name)
    res.log_print()


if __name__ == '__main__':
    main()

Sample response

DeleteScheduledSqlResponse:
headers: {'Server': 'AliyunSLS', 'Content-Length': '0', 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': '*', 'Date': 'Fri, 01 Nov 2024 08:43:57 GMT', 'x-log-time': '1730450637', 'x-log-requestid': '672494CD8AA8A468E4131EF7'}

Process finished with exit code 0