Cron binding spec

Detailed documentation on the cron binding component

Component format

To setup cron binding create a component of type bindings.cron. See this guide on how to create and apply a binding configuration.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: bindings.cron
  8. version: v1
  9. metadata:
  10. - name: schedule
  11. value: "@every 15m" # valid cron schedule

Spec metadata fields

FieldRequiredBinding supportDetailsExample
scheduleYInput/OutputThe valid cron schedule to use. See this for more details“@every 15m”

Schedule Format

The Dapr cron binding supports following formats:

CharacterDescriptorAcceptable values
1Second0 to 59, or
2Minute0 to 59, or
3Hour0 to 23, or (UTC)
4Day of the month1 to 31, or
5Month1 to 12, or
6Day of the week0 to 7 (where 0 and 7 represent Sunday), or

For example:

  • 30 * * * * * - every 30 seconds
  • 0 15 * * * * - every 15 minutes
  • 0 30 3-6,20-23 * * * - every hour on the half hour in the range 3-6am, 8-11pm
  • CRON_TZ=America/New_York 0 0 30 04 * * * - every day at 4:30am New York time

You can learn more about cron and the supported formats here

For ease of use, the Dapr cron binding also supports few shortcuts:

  • @every 15s where s is seconds, m minutes, and h hours
  • @daily or @hourly which runs at that period from the time the binding is initialized

Binding support

This component supports both input and output binding interfaces.

This component supports output binding with the following operations:

  • delete

Related links

Last modified March 18, 2021: Merge pull request #1321 from dapr/aacrawfi/logos (9a399d5)