Edit on github


The following config will attach a schedule event and causes the function crawl to be called every 2 hours. The configuration allows you to attach multiple schedules to the same function. You can either use the rate or cron syntax. Take a look at the AWS schedule syntax documentation for more details.

    handler: crawl
      - schedule: rate(2 hours)
      - schedule: cron(0 12 * * ? *)

#Enabling / Disabling

Note: schedule events are enabled by default.

This will create and attach a schedule event for the aggregate function which is disabled. If enabled it will call the aggregate function every 10 minutes.

    handler: statistics.handler
      - schedule:
          rate: rate(10 minutes)
          enabled: false
            key1: value1
            key2: value2
              stage: dev
      - schedule:
          rate: cron(0 12 * * ? *)
          enabled: false
          inputPath: '$.stageVariables'

#Specify Name and Description

Name and Description can be specified for a schedule event. These are not required properties.

  - schedule:
      name: your-scheduled-rate-event-name
      description: 'your scheduled rate event description'
      rate: rate(2 hours)

Made with love in San Francisco + Atlanta, Austria, Germany, Pakistan, Poland, Nebraska & Thailand

Serverless, Inc. © 2018

Join our monthly newsletter to get the latest Serverless news, updates and happenings.