A cron trigger for your LambdaCD.
In project.clj add
:dependencies [[lambdacd-cron "<most recent version>"]]
Add the following code to your import statements of your pipeline code
(:require [lambdacd-cron.core :as lambdacd-cron])
The following code adds a step to your pipeline which triggers every day at 12:00 UTC
(lambdacd-cron/cron 0 12)
You'll find a complete example here: example/pipeline.clj
The cron pattern given to (cron)
consists of the following parts:
- minutes
- hours
- day-of-month
- month
- day-of-week
Currently only numbers and nil
are supported.
nil
translates to *
.
Omitted values are filled with nil
.
E.g. (cron 0 12)
translates to (cron 0 12 nil nil nil)
.
Feel free to propose any change by sending a PR.
Copyright © 2016 Felix Bechstein
Distributed under the Apache License 2.0