Activity |
CronExecutionDates |
---|---|
Description |
Get the next execution dates of a CRON expression |
Available Since |
1.6.0 |
Input :
PropertyName |
Type |
Required |
Default Value |
Description |
---|---|---|---|---|
Cron |
STRING |
YES |
|
Cron expression ( http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) |
StartDate |
DateTime |
NO |
NOW |
|
EndDate |
DateTime |
NO |
|
Date until which the execution dates will be calculated. If omitted, the number of dates returned will be defined by the parameter MaxResults |
DateFormat |
string |
NO |
yyyy-MM-dd hh:mm:ss |
format of the start and end dates |
MaxResults |
INT |
NO |
1 |
Number of dates returned |
Output
PropertyName |
Type |
Description |
---|---|---|
dates |
DateTime ARRAY |
array containing the next execution dates of the CRON expression |
Example1: Get the next execution of the cron
Input
{
"Cron": "0 15 10 * * ? *",
}
Output
{
"dates":[
"2023-05-27 10:15:00"
]
}
Example1: Get the next executions until a certain date
Input
{
"Cron": "0 0 0 ? * *",
"StartDate" : "2023-01-01 00:00:00",
"EndDate" : "2023-01-05 00:00:00",
"MaxResults" : 100
}
Output
{
"dates":[
"2023-01-02 00:00:00",
"2023-01-03 00:00:00",
"2023-01-04 00:00:00",
"2023-01-05 00:00:00"
]
}