Skip to content
v2.278.0

CronOptions Struct ​

Options to configure a cron expression.

All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
const cronOptions: stepfunctions_tasks.CronOptions = {
  day: 'day',
  hour: 'hour',
  minute: 'minute',
  month: 'month',
  weekDay: 'weekDay',
  year: 'year',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

cron_options = stepfunctions_tasks.CronOptions(
    day="day",
    hour="hour",
    minute="minute",
    month="month",
    week_day="weekDay",
    year="year"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.tasks.*;

CronOptions cronOptions = CronOptions.builder()
        .day("day")
        .hour("hour")
        .minute("minute")
        .month("month")
        .weekDay("weekDay")
        .year("year")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions.Tasks;

var cronOptions = new CronOptions {
    Day = "day",
    Hour = "hour",
    Minute = "minute",
    Month = "month",
    WeekDay = "weekDay",
    Year = "year"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cronOptions := &CronOptions{
	Day: jsii.String("day"),
	Hour: jsii.String("hour"),
	Minute: jsii.String("minute"),
	Month: jsii.String("month"),
	WeekDay: jsii.String("weekDay"),
	Year: jsii.String("year"),
}

Properties ​

dayoptionalstringdayoptionalstrdayoptionalStringDayoptionalstringDayoptional*string #
The day of the month to run this rule at.

Default: Every day of the month

houroptionalstringhouroptionalstrhouroptionalStringHouroptionalstringHouroptional*string #
The hour to run this rule at.

Default: Every hour

minuteoptionalstringminuteoptionalstrminuteoptionalStringMinuteoptionalstringMinuteoptional*string #
The minute to run this rule at.

Default: Every minute

monthoptionalstringmonthoptionalstrmonthoptionalStringMonthoptionalstringMonthoptional*string #
The month to run this rule at.

Default: Every month

weekDayoptionalstringweek_dayoptionalstrweekDayoptionalStringWeekDayoptionalstringWeekDayoptional*string #
The day of the week to run this rule at.

Default: Whichever day of the week that day falls on

yearoptionalstringyearoptionalstryearoptionalStringYearoptionalstringYearoptional*string #
The year to run this rule at.

Default: Every year