System variables for script tasks
This topic describes the system variables for script tasks.
Variable reference
Agent version 1.12.5 or later is required.
All variables follow the #{schedulerx.<variableName>} syntax.
Variable | Description | Scope | Example |
| Job parameters passed to the task. | All tasks |
|
| Shard ID assigned to the current instance. This variable is supported for broadcast and sharding tasks. | Broadcast and sharding tasks |
|
| Shard parameters for the current shard. This variable is supported for sharding tasks. | Sharding tasks only |
|
| Total number of shards. This variable is supported for broadcast and sharding tasks. | Broadcast and sharding tasks |
|
| The number of task retries. | All tasks |
|
| The trigger type. Returns a numeric code. See Trigger types. | All tasks |
|
| The scheduling timestamp, in milliseconds. | All tasks |
|
| The data timestamp, in milliseconds. | All tasks |
|
Trigger types
#{schedulerx.triggerType} returns one of the following numeric codes:
Value | Trigger type |
1 | Timed scheduling |
2 | Data backfill |
3 | API call |
4 | Manual rerun |
5 | System retry |
6 | Manual run |