Show / Hide Table of Contents

Interface ICronOptions

Options to configure a cron expression.

Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICronOptions
Syntax (vb)
Public Interface ICronOptions
Remarks

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

See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Events;
             using Amazon.CDK.AWS.Events.Targets;

             Function fn;

             var rule = new Rule(this, "Schedule Rule", new RuleProps {
                 Schedule = Schedule.Cron(new CronOptions { Minute = "0", Hour = "4" })
             });
             rule.AddTarget(new LambdaFunction(fn));

Synopsis

Properties

Day

The day of the month to run this rule at.

Hour

The hour to run this rule at.

Minute

The minute to run this rule at.

Month

The month to run this rule at.

WeekDay

The day of the week to run this rule at.

Year

The year to run this rule at.

Properties

Day

The day of the month to run this rule at.

string? Day { get; }
Property Value

string

Remarks

Default: - Every day of the month

Hour

The hour to run this rule at.

string? Hour { get; }
Property Value

string

Remarks

Default: - Every hour

Minute

The minute to run this rule at.

string? Minute { get; }
Property Value

string

Remarks

Default: - Every minute

Month

The month to run this rule at.

string? Month { get; }
Property Value

string

Remarks

Default: - Every month

WeekDay

The day of the week to run this rule at.

string? WeekDay { get; }
Property Value

string

Remarks

Default: - Any day of the week

Year

The year to run this rule at.

string? Year { get; }
Property Value

string

Remarks

Default: - Every year

Back to top Generated by DocFX