class TriggerSchedule
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.TriggerSchedule |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsglue#TriggerSchedule |
Java | software.amazon.awscdk.services.glue.TriggerSchedule |
Python | aws_cdk.aws_glue.TriggerSchedule |
TypeScript (source) | aws-cdk-lib » aws_glue » TriggerSchedule |
Represents a trigger schedule.
Example
import * as cdk from 'aws-cdk-lib';
import * as iam from 'aws-cdk-lib/aws-iam';
declare const stack: cdk.Stack;
declare const role: iam.IRole;
declare const script: glue.Code;
const job = new glue.PySparkEtlJob(stack, 'Job', { role, script });
const workflow = new glue.Workflow(stack, 'Workflow');
workflow.addScheduledTrigger('WeeklyTrigger', {
actions: [glue.Action.job(job)],
schedule: glue.TriggerSchedule.weekly(),
});
Properties
| Name | Type | Description |
|---|---|---|
| expression | string | The expression string for the schedule. |
expressionString
Type:
string
The expression string for the schedule.
Methods
| Name | Description |
|---|---|
| static cron(options) | Creates a new TriggerSchedule instance with a cron expression. |
| static daily() | Creates a schedule that fires once a day, at midnight UTC. |
| static expression(expression) | Creates a new TriggerSchedule instance with a custom expression. |
| static weekly() | Creates a schedule that fires once a week, at midnight UTC on Sunday. |
static cron(options)
public static cron(options: CronOptions): TriggerSchedule
Parameters
- options
Cron— The cron options for the schedule.Options
Returns
Creates a new TriggerSchedule instance with a cron expression.
static daily()
public static daily(): TriggerSchedule
Returns
Creates a schedule that fires once a day, at midnight UTC.
static expression(expression)
public static expression(expression: string): TriggerSchedule
Parameters
- expression
string— The custom expression for the schedule.
Returns
Creates a new TriggerSchedule instance with a custom expression.
static weekly()
public static weekly(): TriggerSchedule
Returns
Creates a schedule that fires once a week, at midnight UTC on Sunday.

.NET
Go
Java
Python
TypeScript (