Skip to content

Commit

Permalink
Fix #1350: remove other places where the timer human readable format …
Browse files Browse the repository at this point in the history
…is used
  • Loading branch information
nicolaferraro committed Mar 17, 2020
1 parent 94e7f2e commit 3f615b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/configuration/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The syntax for properties has the form `{{my.property}}`, for example:
[source,groovy]
.props.groovy
----
from('timer:props?period=1s')
from('timer:props?period=1000')
.log('{{my.message}}')
----

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/traits/cron.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ in order to save resources when the integration does not need to be executed.
Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`.

The rules for using a Kubernetes CronJob are the following:
- `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=1m`.
- `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
- `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
`cron:tab?schedule=0/2+*+*+*+?` or `quartz:trigger?cron=0+0/2+*+*+*+?`.

Expand All @@ -27,7 +27,7 @@ The following route is materialized into a Kubernetes CronJob by the `cron` trai
.cron.groovy
[source,groovy]
----
from('timer:groovy?period=1m') // Setting the period e.g. to '1s' restores the default behavior
from('timer:groovy?period=60000') // Setting the period e.g. to '1000' restores the default behavior
.setBody()
.simple('Hello World from Camel K in a CronJob')
.to('log:info?showAll=false')
Expand Down
2 changes: 1 addition & 1 deletion pkg/trait/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (
// Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`.
//
// The rules for using a Kubernetes CronJob are the following:
// - `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=1m`.
// - `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
// - `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
// `cron:tab?schedule=0/2+*+*+*+?` or `quartz:trigger?cron=0+0/2+*+*+*+?`.
//
Expand Down

0 comments on commit 3f615b5

Please sign in to comment.