Skip to content

Commit

Permalink
Merge pull request #55 from joshix/cronspec
Browse files Browse the repository at this point in the history
jobs-cronjobs: Simplify cron notation
  • Loading branch information
kdubois authored Dec 3, 2024
2 parents 9bc2c05 + ab96db1 commit aa8eb84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/kubefiles/whalesay-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: CronJob
metadata:
name: whale-say-cronjob
spec:
schedule: "*/1 * * * *" #<.>
schedule: "* * * * *" #<.>
jobTemplate:
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/examples/whalesay-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: CronJob
metadata:
name: whale-say-cronjob
spec:
schedule: "*/1 * * * *" #<.>
schedule: "* * * * *" #<.>
jobTemplate:
spec:
template:
Expand Down
12 changes: 6 additions & 6 deletions documentation/modules/ROOT/pages/jobs-cronjobs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ Here is some representative output after waiting almost 3 minutes (notice the jo
[source,bash,subs="+macros,+attributes,+quotes"]
----
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE
whale-say-cronjob */1 * * * * False #1# 0s #20s# #<.>
whale-say-cronjob */1 * * * * False 0 31s 51s
whale-say-cronjob */1 * * * * False #1# 0s #80s# #<.>
whale-say-cronjob */1 * * * * False 0 23s 103s
whale-say-cronjob */1 * * * * False #1# 1s #2m21s#
whale-say-cronjob * * * * * False #1# 0s #20s# #<.>
whale-say-cronjob * * * * * False 0 31s 51s
whale-say-cronjob * * * * * False #1# 0s #80s# #<.>
whale-say-cronjob * * * * * False 0 23s 103s
whale-say-cronjob * * * * * False #1# 1s #2m21s#
----
<.> The first invocation took a while to start, this was not a function of the `cronjob` schedule
<.> Notice that the next time the job is active is about 60s after the first job was active (by AGE). And the job after that has an age of ~60s after that
Expand Down Expand Up @@ -276,7 +276,7 @@ Name: whale-say-cronjob
Namespace: myspace
Labels: <none>
Annotations: <none>
Schedule: */1 * * * *
Schedule: * * * * *
Concurrency Policy: Allow
Suspend: False
#Successful Job History Limit: 3# #<.>
Expand Down

0 comments on commit aa8eb84

Please sign in to comment.