CronParseTask
Return a timestamp from a crontab instruction.
Input: None
Returns: A timestamp
Example: Return the unix timestamp for the on-chain SYSCLOCK
{
"cronParseTask": {
"cronPattern": "* * * * * *",
"clockOffset": 0,
"clock": "SYSCLOCK"
}
}
Example: Return the unix timestamp for next friday at 5pm UTC
{
"cronParseTask": {
"cronPattern": "0 17 * * 5",
"clockOffset": 0,
"clock": 0
}
}
Fields
Name | Type | Description |
---|---|---|
clock | Use the TaskRunner’s clock or the on-chain SYSCLOCK. | |
clockOffset | int32 | The timestamp offset to calculate the next run. |
cronPattern | string | The cron pattern to parse. |
Enums
ClockType
Value | Name | Description |
---|---|---|
0 | ORACLE | Use the TaskRunners system clock for the current time. |
1 | SYSCLOCK | Use the on-chain SYSCLOCK for the current time. |