This topic describes how to configure the time properties of a node, including the instance generation method, rerun properties, and scheduling properties.

Open the Scheduling configuration pane

  1. Log on to the DataWorks console.
  2. In the left-side navigation pane, click Workspaces.
  3. In the top navigation bar, select the region where the target workspace resides. Find the target workspace and click Data Analytics in the Actions column.
  4. On the Data Development tab of the DataStudio page, double-click a workflow in the left-side navigation pane. On the workflow dashboard that appears, double-click the node for which you want to configure time properties. The node configuration tab appears.
  5. Click the Scheduling configuration tab in the right-side navigation pane. In the Scheduling configuration pane, set the time properties for the node in the Time attribute section.

Configure an instance generation method

Set the How to generate an instance parameter in the Time attribute section. The following instance generation methods are supported:
  • T+1 generated the next day: If you select this option, instances are generated in full mode.
    • If the node is committed and deployed before 23:30, instances are generated from the next day.
    • If the node is committed and deployed after 23:30, instances are generated from the day after the next day.
  • Generate immediately after publishing: If you select this option, instances are immediately generated after the node is committed and deployed. For more information, see Immediate instance generation.

Configure the parameters related to the status of the node

  • Normal Scheduling: If you select this option, the node is run based on the recurrence. By default, this option is selected for a node.
  • Empty run scheduling: If you select this option, the node is scheduled based on the specified recurrence. However, the scheduling system does not actually run the code but directly returns a success response.
  • Rerun attribute: Select a rule for rerunning the node. Valid values: Run again after success or failure, Do not re-run after successful operation, and re-run after failed operation, and Do not rerun after successful or failed operation. You can select an option as required.
    Note
    • Before you commit the node, make sure that the Rerun attribute parameter is set.
    • If you set the Rerun attribute parameter to Do not rerun after successful or failed operation, the Attention message appears. Click OK.
  • Error automatic rerun: Specify whether to automatically rerun the node when an error occurs. This parameter is available only when the Rerun attribute parameter is set to Run again after success or failure or Do not re-run after successful operation, and re-run after failed operation. If you select this check box, you must further set a maximum number of times and an interval for automatically rerunning the node when an error occurs.
    • Number of automatic reruns with errors: Set the maximum number of automatic reruns after an error occurs. The default value is 3. You can set a custom maximum number as required. The maximum number of automatic reruns can be one at least and ten at most.
    • Error automatic rerun interval: Set the interval between automatic reruns after an error occurs. The default interval is two minutes. You can set a custom interval as required. The interval can be one minute at least and 30 minutes at most.

    This parameter is unavailable if you set the Rerun attribute parameter to Do not rerun after successful or failed operation. In this case, the node is not rerun when an error occurs.

  • Effective Date: Specify the validity period for the automatic scheduling of the node, including a start date and an end date. After the specified period ends, the node is not automatically scheduled.
  • Suspend scheduling: If you select this check box, the node is still scheduled based on the specified recurrence. However, the scheduling system does not actually run the task but directly returns a failure response. You can select this check box when you temporarily do not need to run the node.

Configure the recurrence

After a node is committed and deployed, the scheduling system generates instances every day from the next day based on the scheduling properties of the node. Then, the scheduling system runs the instances based on the running results of ancestor instances and the scheduled time. If a node is committed and deployed after 23:30, the scheduling system generates instances for it from the day after the next day.

For example, if you schedule a node to run every Monday, the node is run only on Mondays. On the other days, the scheduling system does not actually run the code but directly returns a success response. When you test a node that is scheduled by week or generate retroactive data for the node, you must set the scheduled time to one day after the day of the data timestamp.

For an auto triggered node, its dependencies take priority over its time properties. When the scheduled time arrives, the scheduling system does not immediately run a node instance but first checks whether all the ancestor instances are run.
Note
  • If the scheduled time of a node instance has arrived but not all the ancestor instances are run, the node instance is in the Not Running state.
  • If all the ancestor instances are run but the scheduled time of the node instance has not arrived, the node instance enters the Pending (Schedule) state.
  • If the scheduled time of the node instance has arrived and all the ancestor nodes are run, the node instance enters the Pending (Resources) state.

For more information about how to set the Rely on previous cycle parameter, see Cross-cycle dependencies.

You can set the Scheduling cycle parameter to Minutes, Hours, Day, Week, or Month.
  • Nodes that are scheduled by minute are automatically run once every N minutes in a specific time period every day.
    For example, you have created a node. The node is run every 30 minutes in the period from 00:00 to 23:59 every day, as shown in the following figure.Schedule by minute

    The scheduling interval can be five minutes at least. The time expression is automatically generated based on the time you select and cannot be modified.

  • Nodes that are scheduled by hour are automatically run once every N hours in a specific time period every day. For example, a node is run once per hour from 01:00 to 04:00 every day.
    Note The time period is a closed interval. For example, if a node is scheduled to run once per hour in the period from 00:00 to 03:00, the scheduling system generates four instances every day, which are run at 00:00, 01:00, 02:00, and 03:00, respectively.
    Schedule by hour

    For example, you have created a node. The node is automatically run every 6 hours in the period from 00:00 to 23:59 every day, as shown in the following figure. In this case, the scheduling system automatically generates and runs instances for the node.

  • Nodes that are scheduled by day are automatically run once per day. When you create an auto triggered node, the node is set to run at 00:00 every day by default. You can specify another time as needed. In the example shown in the following figure, the time is specified as 13:00.Schedule by day
    • If you select the Timing scheduling check box, the node is run at the specified time every day. The time format is HH:MM.
      Note An auto triggered node can be run only when all the ancestor instances are run and the scheduled time arrives. Both prerequisites are indispensable and have no specific chronological order.
    • If you clear the Timing scheduling check box, the scheduled time of the node is randomly set in the range of 00:00 to 00:30.

    For example, you have created an import node, an analytics node, and an export node. They are all scheduled to run at 13:00 every day. The analytics node depends on the import node, and the export node depends on the analytics node.

    Based on the preceding node scheduling properties, the scheduling system automatically generates and runs instances for the nodes, as shown in the following figure.Generate and run instances
  • Nodes that are scheduled by week are automatically run at a specified time of specified days every week. On the other days, the scheduling system still generates instances to make sure the proper running of descendant instances. However, the system does not actually run the code or consume resources but directly returns a success response.Schedule by week

    For example, you have created a node. The preceding figure shows the scheduling policy of the node. The scheduling system runs instances generated on Mondays and Fridays, but returns success responses without running the code for instances generated on Tuesdays, Wednesdays, Thursdays, Saturdays, and Sundays.

    Based on the preceding node scheduling properties, the scheduling system automatically generates and runs instances for the node, as shown in the following figure.Generate and run instances
  • Nodes that are scheduled by month are automatically run at a specified time of specified days every month. On the other days, the scheduling system still generates instances to make sure the proper running of descendant instances. However, the system does not actually run the code or consume resources but directly returns a success response.Schedule by month

    For example, you have created a node. The preceding figure show the scheduling policy of the node. The scheduling system runs the instance generated on the first day of each month, but returns success responses without running the code for instances generated on the other days.

    Based on the preceding node scheduling properties, the scheduling system automatically generates and runs instances for the node, as shown in the following figure.Generate and run instances