All Products
Search
Document Center

DataWorks:Scheduling parameters

Last Updated:Oct 10, 2026

This topic answers common questions about scheduling parameters.

How do I obtain the previous hour with a scheduling parameter when the calculation crosses a day boundary?

  • Problem

    If the table partition format is day=yyyymmdd,hour=hh24, the task reads data from the previous hour. The parameters $[yyyymmdd] $[hh24-1/24] work except at midnight, when the hour becomes 23 of the current day. How can I handle this?

  • Solution

    Change the calculation formula. Set datetime to $[yyyymmdd-1/24], and keep the calculation formula for hour as $[hh24-1/24].

    Configuration

    • In the code, set day=datetime, hour={hour},

    • Assign the node parameters as datetime=[yyyymmdd-1/24],hour=[hh24-1/24]

    Real-time scenario

    • If an instance is scheduled for 2021-7-21 00:00:00, subtracting one hour goes to the previous day. Then $[yyyymmdd-1/24] is 20210720 and $[hh24-1/24] is 23.

    • If an instance is scheduled for 2021-7-21 01:00:00, subtracting one hour stays within the current day. Then $[yyyymmdd-1/24] is 20210721 and $[hh24-1/24] is 00.

How do I handle spaces in a partition format containing year, month, day, hour, minute, and second, such as pt=yyyy-mm-dd hh24:mi:ss?

Important

Scheduling parameter assignments do not support spaces.

Use two custom variables:

  • Year, month, and day: Parameter datetime=$[yyyy-mm-dd]

  • Hour, minute, and second: Parameter hour=$[hh24:mi:ss]

After obtaining the date and time separately, join them with a space in the code as pt=${datetime} ${hour}. For example, use this SQL: select * from xc_demo_partition where dt='${key1} ${key2}';. Under Schedule > Parameters, configure key1=$[yyyymmdd] key2=$[hh24miss].

A node is scheduled daily for 20:00 and its parameter uses the scheduled time ($cyctime or $[yyyymmddhh24miss]). An upstream failure delays its start until 00:00 the next day. Does the parameter resolve to 20:00 or 00:00?

The scheduled time is when an instance is expected to run. Actual start time may differ, for example, while waiting for resources. The scheduled time is fixed and does not change with the actual run time.

Scheduling parameters use the instance scheduled time. Their resolved values are set when the instance is generated and do not change with its actual run time. In Operation Center > Periodic Instances, the Properties panel shows Scheduled Time as the expected run time, such as 2021-07-13 00:00:00. Compare it with Start Time, for example, 00:00:27. In Data Development, configure Schedule > Parameters with var1=$bizdate var2=$cyctime var3=$[yyyymmdd] var4=$[yyyymmddhh24miss], and keep the calculation formula for Set the scheduling cycle to Day and and the scheduled run time to 00:00. In the code, use select '${var1}' '${var2}'; to check the business date and scheduled time values separately.

How do I configure time parameters in an ODPS Spark node?

When creating an ODPS Spark node, configure its parameters on the edit page. The system uses the configured order.

After defining variables in the code, click Schedule on the right side of the editor and assign values in the parameter panel. For details about scheduling parameters, see Scheduling parameter formats. For example, enter Parameters in the ODPS Spark node field: $(var). Add a row to the parameter table with the parameter name var and value $bizdate. Click Scheduling Parameter Preview to verify the resolved values.

How do I use scheduling parameter values in nodes that cannot easily process them again?

Some nodes, such as batch synchronization nodes, cannot directly use a scheduling parameter result and need further conversion. Configure an assignment node upstream. Have it reference the scheduling parameter and convert the result, then pass the final value to the downstream node through node context.

What is the difference between getting a date from a MaxCompute date function and from a scheduling parameter?

  • A MaxCompute date function returns the time shown by the machine running the compute task. Running the same instance at different times can produce different results.

  • A scheduling parameter is calculated from the scheduled time. Its result remains the same regardless of when the same instance runs.

How do I test scheduling parameters in Data Development?

Scheduling parameters are automatically replaced only by the scheduling system. To test them in Data Development as they would be replaced by the scheduler, use a development environment smoke test.

Note

Data Integration tasks have no development environment test feature. To test parameter replacement for these tasks, create a SQL node and first test the parameters independently with a development environment smoke test. Once the results are as expected, use the parameters in the Data Integration node.

FAILED: ODPS-0130161:[1,84] Parse exception - invalid token '$'Problem

Cause: The scheduling parameter was not assigned a value, or the assignment failed.

SolutionSolution:

  1. Check whether the scheduling parameter has a value.

  2. Check whether the configured parameter meets the requirements. For details, see Scheduling parameter formats.

Important

After changing parameter settings, commit and publish the task. Then check the periodic task Properties panel in the production Operation Center to confirm that the latest values are present.

params format error,please check your params(key=values)

Solution:

  1. Check whether the variable has a value.

  2. Check for extra spaces in the scheduling parameter.

  3. Do not combine a period (.) and Chinese characters in a node name.

Example:time①=②$[yyyymmdd③hh24:mi:ss]time1=$[yyyymmdd]④time2=$[hh24:mi:ss] (①②③④ mark the locations of spaces).

  • Do not put spaces around the equals sign (=) in a scheduling parameter; see ① and ②.

  • Spaces are not supported within a scheduling parameter assignment; see ③.

  • Separate two scheduling parameters with one space; see ④.

What are the differences in value assignment between Run, Advanced Run, and a development environment smoke test?

Operation

Description

Run

The first time you run the node, manually assign a constant to the variable; this first value is saved. If you change the code, the variable still uses the value assigned on the first run.

Advanced Run

For an advanced run, manually assign constants to variables in the current code. If you change variables in the code, use Advanced Run to assign them again.

Note

To change the task execution resource group, use Advanced Run.

Development environment smoke test

Manually select a business date to simulate automatic scheduling and obtain the parameter values for that date.

In the Data Development page code editor, use built-in variables, such as ${bdp.system.cyctime}, or custom variables, such as ${var1}. Assign values in the right-hand Schedule > Parameters panel, for example, var1=$bizdate. Variables are replaced automatically when you use Run or Advanced Run. For a development environment smoke test, choose a business date on the top toolbar to simulate scheduling.

How do I view scheduling parameter replacement in the production environment?

After changing a scheduling parameter in Data Development and committing and publishing the task, check its value in the periodic task Properties panel in the production Operation Center. If it is not as expected, check the task publishing status and publish package to confirm that publishing succeeded. In the periodic instance Properties panel, view the replacement values for an individual instance.

Important

An instance’s execution parameters are updated in real time to the latest production periodic task parameter configuration, regardless of whether the instance has run.

Real-time scenario:

  • On the current day, the scheduling parameter time1 of periodic instance A1 for node A has the value $bizdate. The instance ran successfully that day, and the value used in the code was the bizdate business date (specific value).

  • Later that day, the parameter time1 changes from $bizdate to $cyctime. The execution parameter shown for that day’s instance becomes the cyctime scheduled time (specific value).

  • If you rerun that instance, it uses the latest configuration: time1=$cyctime

  • To see parameter replacement values used before the change, check the logs. For details, see the FAQ about viewing replacement values in logs.How do I view the scheduling parameter values used by an instance in its logs?.

In the Operation Center > Periodic Instances page, select an instance. In the Properties panel’s Execution Parameters field to see the actual resolved values, such as var1=20210708233000 var2=20210709000000, and confirm that the values are updated as expected.

How do I view the scheduling parameter values used by an instance in its logs?

Find SKYNET_PARAVALUE in the log.

07-09 00:00:19  INFO SKYNET_RERUN_MODE=1:
07-09 00:00:19  INFO SKYNET_FLOW_PARAVALUE=:
07-09 00:00:19  INFO SKYNET_ONDUTY=xxx:
07-09 00:00:19  INFO SKYNET_SYSTEMID=:
07-09 00:00:19  INFO CALC_ENGINE_IDENTIFIER=xxx:
07-09 00:00:19  INFO SKYNET_SOURCEID=xxx:
07-09 00:00:19  INFO SKYNET_PARAVALUE=var1=20210708233000 var2=20210709000000:
07-09 00:00:19  INFO SKYNET_TASKID=xxx:
07-09 00:00:19  INFO SKYNET_TENANT_ID=283789484710656:
07-09 00:00:19  INFO SKYNET_ID=700003341088:
07-09 00:00:19  INFO SKYNET_JOBID=700200619122:
07-09 00:00:19  INFO SKYNET_NODENAME=xc_partition_copy:
07-09 00:00:19  INFO SKYNET_CYCTYPE=0:
07-09 00:00:19  INFO SKYNET_DSC_JOB_VERSION=1:
07-09 00:00:19  INFO SKYNET_TASK_INPUT={}:
07-09 00:00:19  INFO SKYNET_FLOWNAME=ATCLOUD_FLOW:
07-09 00:00:19  INFO FILE_ID=700003341088:

How do I define a time zone for scheduling parameters?

Daylight saving time is supported for instance generation and parameter partition calculations, so tasks can run correctly on transition days. For example, in US Pacific time:

  • On the day daylight saving time begins, 23 instances are generated. Subtracting 10 minutes from 03:00 gives 01:50. A task scheduled for 02:00 on that day runs as an empty task.

  • On the day daylight saving time ends, 24 instances are generated. Subtracting 10 minutes from 03:00 gives 02:50.

For a daily, weekly, or monthly node scheduled in the skipped interval on the day daylight saving time begins, the generated instance is scheduled for midnight on that day.

Scheduling parameters are configured and published for the node, but the returned value never changes

Check whether a business process parameter with the same name overrides the scheduling parameter. For the procedure, see Use workflow parameters.

If such a business process parameter exists, delete it if unused. If it must be retained, rename the node scheduling parameter.