This code will send schedule summaries over email.
You can use the syntax below to specify the time.
cron(Minutes Hours Day-of-month Month Day-of-week Year)
All fields are required and time zone is UTC only.
Field | Values | Wildcards |
---|---|---|
Minutes | 0-59 | , - * / |
Hours | 0-23 | , - * / |
Day-of-month | 1-31 | , - * ? / L W |
Month | 1-12 or JAN-DEC | , - * / |
Day-of-week | 1-7 or SUN-SAT | , - * ? / L # |
Year | 192199 | , - * / |
In below example, we use cron
syntax to define schedule
event that will trigger our cronHandler
function every second minute every Monday through Friday
functions:
cronHandler:
handler: handler.run
events:
- schedule: cron(0/2 * ? * MON-FRI *)
Detailed information about cron expressions in available in official AWS docs.