This event allows you to set up scheduled invocations of your function.

The plugin automatically configures a trigger and rule to connect your function to the trigger feed from the alarm package.


The schedule event configuration is controlled by a string, based on the UNIX crontab syntax, in the format cron(X X X X X). This can either be passed in as a native string or through the rate parameter.


The following config will attach a schedule event and causes the function crawl to be called every minute.

    handler: crawl
      - schedule: cron(* * * * *) // run every minute

This automatically generates a new trigger (\${service}_crawl_schedule_trigger) and rule (\${service}_crawl_schedule_rule`) during deployment.

#Customise Parameters

Other schedule event parameters can be manually configured, e.g trigger or rule names.

    handler: statistics.handler
      - schedule:
          rate: cron(0 * * * *) // call once an hour
          trigger: triggerName
          rule: ruleName
          max: 10000 // max invocations, default: 1000, max: 10000
          params: // event params for invocation
            hello: world

Have questions?

Head over to the forums to search for your questions and issues or post a new one.