bedrock.schedules.decorators.cron

 1def cron(expression: str):  # pragma: unit
 2    """
 3    This decorator sets the cron schedule for a ScheduleEndpoint.
 4
 5    It serves as a hint to Bedrock when generating the intermediate files
 6    that help Terraform configure EventBridge Scheduler.
 7
 8    :param expression: A cron expression string (e.g., "0 8 * * ? *" for daily at 8 AM UTC)
 9
10    AWS EventBridge cron format: minute hour day-of-month month day-of-week year
11    See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html
12    """
13    def decorator(cls):
14        cls.__cron__ = expression
15        return cls
16
17    return decorator
def cron(expression: str):
 2def cron(expression: str):  # pragma: unit
 3    """
 4    This decorator sets the cron schedule for a ScheduleEndpoint.
 5
 6    It serves as a hint to Bedrock when generating the intermediate files
 7    that help Terraform configure EventBridge Scheduler.
 8
 9    :param expression: A cron expression string (e.g., "0 8 * * ? *" for daily at 8 AM UTC)
10
11    AWS EventBridge cron format: minute hour day-of-month month day-of-week year
12    See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html
13    """
14    def decorator(cls):
15        cls.__cron__ = expression
16        return cls
17
18    return decorator

This decorator sets the cron schedule for a ScheduleEndpoint.

It serves as a hint to Bedrock when generating the intermediate files that help Terraform configure EventBridge Scheduler.

Parameters
  • expression: A cron expression string (e.g., "0 8 * * ? *" for daily at 8 AM UTC)

AWS EventBridge cron format: minute hour day-of-month month day-of-week year See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html