Skip to content
A Cron Connector for OpenFaaS
Go Shell Makefile Dockerfile Smarty
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead of zeerorg:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Fixed only one function executing from multiple choices (zeerorg#13) Jun 10, 2019
chart/cron-connector Update build process Dec 4, 2019
travis Adding helm chart and end2end test (zeerorg#12) Jun 10, 2019
yaml Update kubernetes yaml to remove depricated api Dec 4, 2019
.travis.yml Update travis Dec 4, 2019

A Cron Connector for OpenFaaS

This is a cron event connector for OpenFaaS. This was built to provide a timer interface to trigger OpenFaaS functions. Also checkout OpenFaaS docs on cron for other methods on how you can run functions triggered by cron.

This project was forked from zeerorg/cron-connector to enable prompt updates and patches for end-users.

How to Use

You need to have OpenFaaS deployed first, see to get started

Works with both AMD64 and armhf (Raspberry Pi).

  1. For Docker Swarm:
curl -s | docker stack deploy func -c -
  1. For Kubernetes:
curl -s | kubectl apply -f - 

Adding function

The function should have 2 annotations:

  1. topic annotation should be cron-function.
  2. schedule annotation should be the cron schedule on which to invoke function

For example, we may have a function "nodeinfo" which we want to invoke every 5 minutes:

Deploy via the CLI:

faas-cli store deploy nodeinfo --annotation schedule="*/5 * * * *" --annotation topic=cron-function

Or via stack.yml:

    image: functions/nodeinfo
      topic: cron-function
      schedule: "*/5 * * * *"

You can learn how to create and test the Cron syntax here.

See the full example here: sample/stack.yml


The helm chart is available in the faas-netes repo.

You can’t perform that action at this time.