Class TriggerSchedule
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.glue.TriggerSchedule
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-17T14:54:05.119Z")
@Stability(Stable)
public class TriggerSchedule
extends software.amazon.jsii.JsiiObject
Represents a trigger schedule.
Example:
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.iam.*;
Stack stack;
IRole role;
Code script;
PySparkEtlJob job = PySparkEtlJob.Builder.create(stack, "Job").role(role).script(script).build();
Workflow workflow = new Workflow(stack, "Workflow");
workflow.addScheduledTrigger("WeeklyTrigger", ScheduledTriggerOptions.builder()
.actions(List.of(Action.job(job)))
.schedule(TriggerSchedule.weekly())
.build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTriggerSchedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTriggerSchedule(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic TriggerSchedulecron(CronOptions options) Creates a new TriggerSchedule instance with a cron expression.static TriggerScheduledaily()Creates a schedule that fires once a day, at midnight UTC.static TriggerScheduleexpression(String expression) Creates a new TriggerSchedule instance with a custom expression.The expression string for the schedule.static TriggerScheduleweekly()Creates a schedule that fires once a week, at midnight UTC on Sunday.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TriggerSchedule
protected TriggerSchedule(software.amazon.jsii.JsiiObjectRef objRef) -
TriggerSchedule
protected TriggerSchedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
cron
Creates a new TriggerSchedule instance with a cron expression.- Parameters:
options- The cron options for the schedule. This parameter is required.- Returns:
- A new TriggerSchedule instance.
-
daily
Creates a schedule that fires once a day, at midnight UTC.- Returns:
- A new TriggerSchedule instance.
-
expression
Creates a new TriggerSchedule instance with a custom expression.- Parameters:
expression- The custom expression for the schedule. This parameter is required.- Returns:
- A new TriggerSchedule instance.
-
weekly
Creates a schedule that fires once a week, at midnight UTC on Sunday.- Returns:
- A new TriggerSchedule instance.
-
getExpressionString
The expression string for the schedule.
-