All Products
Search
Document Center

DataWorks:Impacts exerted by the switching of daylight saving time on the running of tasks

Last Updated:Feb 20, 2025

This topic describes the impacts on instance generation for tasks and the scheduling time of the instances when daylight saving time begins or ends. If daylight saving time is used in the region where your workspace resides, you can view this topic to understand the policies for running tasks when daylight saving time begins or ends.

Background information

In DataWorks, tasks can be run as expected on the day when daylight saving time begins or ends. For example, you create tasks that are scheduled to run by hour in the region of which the time zone is UTC-8. Daylight saving time is used in the region. The following descriptions show the policies for running tasks on the day when daylight saving time begins or ends:

  • Daylight saving time begins

    image
    • Number of instances: Daylight saving time begins at 02:00, and the time of the clock is set forward to 03:00. For a task that is scheduled to run by hour, no instance is generated for the task at 02:00 on the day when daylight saving time begins, and 23 instances are generated on that day.

    • Scheduling time of instances: A time offset occurs. As a result, the scheduling time of some instances is changed to a point in time that is one hour forward. For example, the scheduling time of the instance that is generated in the fourth scheduling cycle for a task that is scheduled to run by hour is 04:00. On the day when daylight saving time begins, the scheduling time of the instance changes to 05:00.

    Note
    • If a task scheduled by day, week, or month is scheduled to run in the time range that is skipped when daylight saving time begins, the task is not run and DataWorks generates dry-run instances for the task.

    • Ten minutes before 03:00 is 01:50.

  • Daylight saving time ends

    image

    Number of instances: A total number of 24 instances are generated for a task that is scheduled to run by hour. Two instances whose scheduling time is both 02:00 are generated. Only the second instance whose scheduling time is 02:00 is retained.

    Note

    Ten minutes before 02:00 is 02:50.

Limits

Only tasks in the region where daylight saving time is used are affected when daylight saving time begins or ends.

Example: Impacts exerted when daylight saving time begins

Impact 1: Instance generation

  • Scenario 1: Tasks scheduled by hour or minute

    The following figure shows the scheduling settings for an auto triggered task that is scheduled by hour. In this case, one instance is generated for the task each hour, and a total number of 24 instances are generated on one day. On the day when daylight saving time begins, only 23 instances are generated, and no instance is generated at 02:00.

    Note

    Daylight saving time begins at 02:00, and the time of the clock is set forward to 03:00. Therefore, for a task that is scheduled to run by hour, no instance is generated for the task at 02:00 on the day when daylight saving time begins.

    image

  • Scenario 2: Tasks scheduled by day

    For a task that is scheduled to run by day, an instance is generated for the task on the day when daylight saving time begins. Whether the instance can be properly run depends on the scheduling time of the task.

    • If the scheduling time of the task is in the time range from 02:00 to 03:00, DataWorks delays the scheduling time of the task for one hour and generates a dry-run instance for the task.

    • If the scheduling time of the task is out of the time range from 02:00 to 03:00, the instance that is generated for the task can be properly run.

    The following figure shows the scheduling settings for the task.

    image

Impact 2: Parameter value replacement

  • Scenario 1: The scheduling time of a task is 03:00, and a scheduling parameter that is in the $[hh24-1/24] format is used. In most cases, the value of the scheduling parameter is 02:00. When daylight saving time begins, the value of the scheduling parameter is 01:00.

  • Scenario 2: The scheduling time of a task is 02:00, and a scheduling parameter that is in the $[hh24-1/24] format is used. In most cases, the value of the scheduling parameter is 01:00. When daylight saving time begins, the value of the scheduling parameter is 01:00. If the task is scheduled to run by day, DataWorks generates a dry-run instance for the task on the day when daylight saving time begins.

Example: Impacts exerted when daylight saving time ends

Impact 1: Instance generation

The day when daylight saving time ends actually has 25 hours, including two occurrences of 02:00. A total number of 24 instances are generated for a task that is scheduled by hour. Only the second instance whose scheduling time is 02:00 is retained.

Impact 2: Parameter value replacement

The day when daylight saving time ends actually has 25 hours, including two occurrences of 02:00. A total number of 24 instances are generated for a task that is scheduled to run by hour. Only the second instance whose scheduling time is 02:00 is retained. If the value of a scheduling parameter that is specified for the task is calculated based on the scheduling time, the value of the scheduling parameter may be affected, and a deviation may occur. The following scenarios provide details:

  • Scenario 1: The scheduling time of a task is 03:00, and a scheduling parameter that is in the $[hh24-2/24] format is used. In most cases, the value of the scheduling parameter is 01:00. When daylight saving time ends, the value of the scheduling parameter is 02:00.

  • Scenario 2: The scheduling time of a task is 02:00, and a scheduling parameter that is in the $[hh24-1/24] format is used. In most cases, the value of the scheduling parameter is 01:00. When daylight saving time ends, the value of the scheduling parameter is 02:00.