Modify a time-based schedule

更新时间:
复制 MD 格式

You can modify a time-based schedule by using the console or the Alibaba Cloud CLI.

Prerequisites

A time-based schedule is created.

Use the console

  1. Log on to the Serverless Workflow console.

  2. On the Flows page, find the workflow for which you want to create a time-based schedule and click the name of the workflow in the Name column.

    workflow-name

  3. Click the Schedules tab.

  4. Click the name of the target schedule.

  5. In the Update Schedule panel, modify the parameters as needed and click OK.

    For more information about how to configure the parameters, see Create a time-based schedule.

Use the CLI

You must install and configure Alibaba Cloud CLI Before you use it. For more information, see What is Alibaba Cloud CLI

  1. Optional: Run the following command to view the request parameters of the API.

    aliyun fnf UpdateSchedule help

    The following output is expected:

    Alibaba Cloud Command Line Interface Version 3.0.45
    Product: fnf (FunctionFlow)
    Link:    https://xxxxxx.html
    Parameters:
      --FlowName       String  Required
      --ScheduleName   String  Required
      --CronExpression String  Optional
      --Description    String  Optional
      --Enable         Boolean Optional
      --Payload        String  Optional
      --RequestId      String  Optional
  2. Run the following command to modify the time-based schedule.

    aliyun fnf UpdateSchedule --FlowName test --ScheduleName schedule-test --Description "updated description" --Enable false

    The following output is expected:

    {
            "CreatedTime": "2024-06-26T03:36:57Z",
            "CronExpression": "@every 1m",
            "Description": "updated description",
            "Enable": false,
            "LastModifiedTime": "2024-06-26T06:00:14Z",
            "Payload": "{\"key\":\"value\"}",
            "RequestId": "166523cb-b3c6-62dc-18dc-73f861526f7d",
            "ScheduleId": "b888a48f-229d-4b35-adc6-5c63a37cf3b1",
            "ScheduleName": "schedule-test"
    }