![]() ![]() Note: scheduler does not accept the inputPath or inputTransformer options. This will trigger the function at certain times on weekdays and on different times on weekends, using the same input: functions: foo: handler: foo.handler events: - schedule: rate: - cron(0 0 /4 ? * MON-FRI *) - cron(0 2 ? * SAT-SUN *) input: key1: value1 key2: value2 Use AWS::Scheduler::Schedule instead of AWS::Event::Rule This is specially useful in situations in which there's no other way than using multiple cron expressions to schedule a function. ![]() using either rate or cron syntax) can be specified, in order to avoid repeating other configuration variables. events: - schedule: name: your-scheduled-rate-event-name description: 'your scheduled rate event description' rate: rate(2 hours) Specify multiple schedule expressionsĪn array of schedule expressions (i.e. Name and Description can be specified for a schedule event. If enabled it will callįunctions: aggregate: handler: statistics.handler events: - schedule: rate: rate(10 minutes) enabled: false input: key1: value1 key2: value2 stageParams: stage: dev - schedule: rate: cron(0 12 * * ? *) enabled: false inputPath: '$.stageVariables' - schedule: rate: rate(2 hours) enabled: true inputTransformer: inputPathsMap: eventTime: '$.time' inputTemplate: '' Specify Name and Description This will create and attach a schedule event for the aggregate function which is disabled. Note: schedule events are enabled by default. functions: crawl: handler: crawl events: - schedule: rate(2 hours) - schedule: cron(0 12 * * ? *) Enabling / Disabling Take a look at the AWS schedule syntax documentation for more details. You can either use the rate or cron syntax. The configuration allows you to attach multiple schedules to the same function. The following config will attach a schedule event and causes the function crawl to be called every 2 hours.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |