Deleting a schedule in EventBridge Scheduler
You can delete a schedule by either configuring automatic deletion, or by manually deleting an individual schedule. Use following topics to learn how you to delete a schedule using both methods, and why you might choose one method over the other.
Deletion after schedule completion
Configure automatic deletion after schedule completion if you want to avoid having to individually manage your schedule resources on EventBridge Scheduler. In applications where you create thousands of schedules at a time and need flexibility to scale up the number of your schedules on demand, automatic deletion can ensure that you do not reach your account quota for the number of schedules in a specified Region.
When you configure automatic deletion for a schedule, EventBridge Scheduler deletes the schedule after its last target invocation. For one-time schedules, this occurs after the schedule has invoked its target once. For recurring schedules you set up with rate, or cron, expressions, your schedule is
deleted after its last invocation. A recurring schedule's last invocation is the invocation that occurs closest to the EndDate
you specify. If you configure a schedule with
automatic deletion but do not specify a value for EndDate
, EventBridge Scheduler does not automatically delete the schedule.
You can set up automatic deletion when you first create a schedule, or update preferences for an existing schedule. The following steps describe how to configure automatic deletion for an existing schedule.
Manual deletion
When you no longer need a schedule, you can delete it using the DeleteSchedule
operation.
Example AWS CLI
$
aws scheduler delete-schedule --name
your-schedule
Example Python SDK
import boto3 scheduler = boto3.client('scheduler') scheduler.delete_schedule(Name="your-schedule")