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
Number of instances: Daylight saving time begins at
02:00
, and the time of the clock is set forward to03:00
. For a task that is scheduled to run by hour, no instance is generated for the task at02: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 to05:00
.
NoteIf 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
is01:50
.
Daylight saving time ends
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 is02:00
is retained.NoteTen minutes before
02:00
is02: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
.NoteDaylight saving time begins at
02:00
, and the time of the clock is set forward to03:00
. Therefore, for a task that is scheduled to run by hour, no instance is generated for the task at02:00
on the day when daylight saving time begins.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.
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 is02:00
. When daylight saving time begins, the value of the scheduling parameter is01: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 is01:00
. When daylight saving time begins, the value of the scheduling parameter is01: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 is01:00
. When daylight saving time ends, the value of the scheduling parameter is02: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 is01:00
. When daylight saving time ends, the value of the scheduling parameter is02:00
.