From 1513d9fcf602e3816aa0e130fe9d5d59ad2445c8 Mon Sep 17 00:00:00 2001 From: Hesham Massoud Date: Thu, 28 Jun 2018 12:25:25 +0200 Subject: [PATCH 1/8] Update cron-jobs.md --- .../en/docs/concepts/workloads/controllers/cron-jobs.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/docs/concepts/workloads/controllers/cron-jobs.md b/content/en/docs/concepts/workloads/controllers/cron-jobs.md index 521a69b44fc25..5d590a024f127 100644 --- a/content/en/docs/concepts/workloads/controllers/cron-jobs.md +++ b/content/en/docs/concepts/workloads/controllers/cron-jobs.md @@ -36,10 +36,10 @@ If `startingDeadlineSeconds` is set to a large value or left unset (the default) and if `concurrencyPolicy` is set to `Allow`, the jobs will always run at least once. -Jobs may fail to run if the CronJob controller is not running or broken for a -span of time from before the start time of the CronJob to start time plus -`startingDeadlineSeconds`, or if the span covers multiple start times and -`concurrencyPolicy` does not allow concurrency. +For every CronJob, the CronJob controller checks how many schedules it missed in the duration from its last scheduled time till now. If there are more than 100 missed schedules, then it doesn't start the job. This would mean that, for example, If `concurrencyPolicy` does not allow concurrency, a job will be counted as missed if it was attempted to be scheduled when there was a previously scheduled cronjob still running. + +It is important to note, that if the field `startingDeadlineSeconds` is set (not `nil`), it will count how many missed jobs occurred from the value of `startingDeadlineSeconds` till now. For example, if `startingDeadlineSeconds` is `10`, It will count how many missed jobs occurred in the last 10 seconds. + For example, suppose a cron job is set to start at exactly `08:30:00` and its `startingDeadlineSeconds` is set to 10, if the CronJob controller happens to be down from `08:29:00` to `08:42:00`, the job will not start. From 9e777c5bc1265c4a2889bba25dbd6ddba99a3e3f Mon Sep 17 00:00:00 2001 From: Hesham Massoud Date: Thu, 28 Jun 2018 12:34:08 +0200 Subject: [PATCH 2/8] Update automated-tasks-with-cron-jobs.md --- content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md b/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md index fd6ff6ca5b0bd..53c1fa33f3e95 100755 --- a/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md +++ b/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md @@ -146,6 +146,8 @@ After the deadline, the cron job does not start the job. Jobs that do not meet their deadline in this way count as failed jobs. If this field is not specified, the jobs have no deadline. +It is important to note, that if the field `.spec.startingDeadlineSeconds` is set (not nil), the CronJob controller will count how many missed jobs occurred from the value of `.spec.startingDeadlineSeconds` till now. For example, if it set to `200`, It will count how many missed schedules occurred in the last 200 seconds. If there were more than a 100 missed schedules, the cronjob will not be scheduled. + ### Concurrency Policy The `.spec.concurrencyPolicy` field is also optional. From 29f12d7eb7466f4f67a2f9b3fde46762daf4ed8a Mon Sep 17 00:00:00 2001 From: Hesham Massoud Date: Thu, 28 Jun 2018 12:35:20 +0200 Subject: [PATCH 3/8] Update cron-jobs.md --- content/en/docs/concepts/workloads/controllers/cron-jobs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/workloads/controllers/cron-jobs.md b/content/en/docs/concepts/workloads/controllers/cron-jobs.md index 5d590a024f127..a944bfb42982d 100644 --- a/content/en/docs/concepts/workloads/controllers/cron-jobs.md +++ b/content/en/docs/concepts/workloads/controllers/cron-jobs.md @@ -38,7 +38,7 @@ at least once. For every CronJob, the CronJob controller checks how many schedules it missed in the duration from its last scheduled time till now. If there are more than 100 missed schedules, then it doesn't start the job. This would mean that, for example, If `concurrencyPolicy` does not allow concurrency, a job will be counted as missed if it was attempted to be scheduled when there was a previously scheduled cronjob still running. -It is important to note, that if the field `startingDeadlineSeconds` is set (not `nil`), it will count how many missed jobs occurred from the value of `startingDeadlineSeconds` till now. For example, if `startingDeadlineSeconds` is `10`, It will count how many missed jobs occurred in the last 10 seconds. +It is important to note, that if the field `startingDeadlineSeconds` is set (not `nil`), it will count how many missed jobs occurred from the value of `startingDeadlineSeconds` till now. For example, if `startingDeadlineSeconds` is `200`, It will count how many missed jobs occurred in the last 200 seconds. For example, suppose a cron job is set to start at exactly `08:30:00` and its `startingDeadlineSeconds` is set to 10, if the CronJob controller happens to From f4f5f03aa8339c991d372eb16c5082abb5691d06 Mon Sep 17 00:00:00 2001 From: Hesham Massoud Date: Mon, 9 Jul 2018 17:37:23 +0200 Subject: [PATCH 4/8] Reword added documentation and add info about error message. --- .../docs/concepts/workloads/controllers/cron-jobs.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/content/en/docs/concepts/workloads/controllers/cron-jobs.md b/content/en/docs/concepts/workloads/controllers/cron-jobs.md index a944bfb42982d..fe4195f6ae012 100644 --- a/content/en/docs/concepts/workloads/controllers/cron-jobs.md +++ b/content/en/docs/concepts/workloads/controllers/cron-jobs.md @@ -36,9 +36,15 @@ If `startingDeadlineSeconds` is set to a large value or left unset (the default) and if `concurrencyPolicy` is set to `Allow`, the jobs will always run at least once. -For every CronJob, the CronJob controller checks how many schedules it missed in the duration from its last scheduled time till now. If there are more than 100 missed schedules, then it doesn't start the job. This would mean that, for example, If `concurrencyPolicy` does not allow concurrency, a job will be counted as missed if it was attempted to be scheduled when there was a previously scheduled cronjob still running. +For every CronJob, the CronJob controller checks how many schedules it missed in the duration from its last scheduled time till now. If there are more than 100 missed schedules, then it will not start the job and it will log the error -It is important to note, that if the field `startingDeadlineSeconds` is set (not `nil`), it will count how many missed jobs occurred from the value of `startingDeadlineSeconds` till now. For example, if `startingDeadlineSeconds` is `200`, It will count how many missed jobs occurred in the last 200 seconds. +```` +Cannot determine if job needs to be started. Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew. +```` + +It is important to note, that if the field `startingDeadlineSeconds` is set (not `nil`), the controller will count how many missed jobs occurred from the value of `startingDeadlineSeconds` till now, rather than from the last scheduled time till now. For example, if `startingDeadlineSeconds` is `200`, the controller will count how many missed jobs occurred in the last 200 seconds. + +A CronJob will be counted as missed if it failed to be created at its scheduled time. For example, If `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed. For example, suppose a cron job is set to start at exactly `08:30:00` and its `startingDeadlineSeconds` is set to 10, if the CronJob controller happens to From c32c1a594160ed86007b4e4b9845ff19c4c1b909 Mon Sep 17 00:00:00 2001 From: Hesham Massoud Date: Mon, 9 Jul 2018 17:39:04 +0200 Subject: [PATCH 5/8] Fix grammatical typo. --- content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md b/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md index 53c1fa33f3e95..bc9f702997289 100755 --- a/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md +++ b/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md @@ -146,7 +146,7 @@ After the deadline, the cron job does not start the job. Jobs that do not meet their deadline in this way count as failed jobs. If this field is not specified, the jobs have no deadline. -It is important to note, that if the field `.spec.startingDeadlineSeconds` is set (not nil), the CronJob controller will count how many missed jobs occurred from the value of `.spec.startingDeadlineSeconds` till now. For example, if it set to `200`, It will count how many missed schedules occurred in the last 200 seconds. If there were more than a 100 missed schedules, the cronjob will not be scheduled. +It is important to note, that if the field `.spec.startingDeadlineSeconds` is set (not nil), the CronJob controller will count how many missed jobs occurred from the value of `.spec.startingDeadlineSeconds` till now. For example, if it is set to `200`, It will count how many missed schedules occurred in the last 200 seconds. If there were more than a 100 missed schedules, the cronjob will not be scheduled. ### Concurrency Policy From 23a1bca5c583f116ca0b1dc25f5da81605b791cf Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Wed, 18 Jul 2018 16:54:23 -0700 Subject: [PATCH 6/8] adjust grammar and punctuation --- content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md b/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md index bc9f702997289..27b34ecd9fdf1 100755 --- a/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md +++ b/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md @@ -146,7 +146,7 @@ After the deadline, the cron job does not start the job. Jobs that do not meet their deadline in this way count as failed jobs. If this field is not specified, the jobs have no deadline. -It is important to note, that if the field `.spec.startingDeadlineSeconds` is set (not nil), the CronJob controller will count how many missed jobs occurred from the value of `.spec.startingDeadlineSeconds` till now. For example, if it is set to `200`, It will count how many missed schedules occurred in the last 200 seconds. If there were more than a 100 missed schedules, the cronjob will not be scheduled. +It is important to note that if the `.spec.startingDeadlineSeconds` field is set (not nil), the CronJob controller counts how many missed jobs occurred from the value of `.spec.startingDeadlineSeconds` until now. For example, if it is set to `200`, it counts how many missed schedules occurred in the last 200 seconds. If there were more than 100 missed schedules, the cronjob would not be scheduled. ### Concurrency Policy From b3e315d0f5fec06825dd6c351273416971b729ae Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Wed, 18 Jul 2018 16:56:54 -0700 Subject: [PATCH 7/8] adjust grammar and punctuation --- content/en/docs/concepts/workloads/controllers/cron-jobs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/concepts/workloads/controllers/cron-jobs.md b/content/en/docs/concepts/workloads/controllers/cron-jobs.md index fe4195f6ae012..27c26d0596151 100644 --- a/content/en/docs/concepts/workloads/controllers/cron-jobs.md +++ b/content/en/docs/concepts/workloads/controllers/cron-jobs.md @@ -36,13 +36,13 @@ If `startingDeadlineSeconds` is set to a large value or left unset (the default) and if `concurrencyPolicy` is set to `Allow`, the jobs will always run at least once. -For every CronJob, the CronJob controller checks how many schedules it missed in the duration from its last scheduled time till now. If there are more than 100 missed schedules, then it will not start the job and it will log the error +For every CronJob, the CronJob controller checks how many schedules it missed in the duration from its last scheduled time until now. If there are more than 100 missed schedules, then it does not start the job and logs the error ```` Cannot determine if job needs to be started. Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew. ```` -It is important to note, that if the field `startingDeadlineSeconds` is set (not `nil`), the controller will count how many missed jobs occurred from the value of `startingDeadlineSeconds` till now, rather than from the last scheduled time till now. For example, if `startingDeadlineSeconds` is `200`, the controller will count how many missed jobs occurred in the last 200 seconds. +It is important to note that if the `startingDeadlineSeconds` field is set (not `nil`), the controller counts how many missed jobs occurred from the value of `startingDeadlineSeconds` until now rather than from the last scheduled time until now. For example, if `startingDeadlineSeconds` is `200`, the controller counts how many missed jobs occurred in the last 200 seconds. A CronJob will be counted as missed if it failed to be created at its scheduled time. For example, If `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed. From bef0c573790d3e5d27a66ed5ccbe85ee5519aa87 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Wed, 18 Jul 2018 16:58:01 -0700 Subject: [PATCH 8/8] adjust tense --- content/en/docs/concepts/workloads/controllers/cron-jobs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/workloads/controllers/cron-jobs.md b/content/en/docs/concepts/workloads/controllers/cron-jobs.md index 27c26d0596151..628bfce8af63c 100644 --- a/content/en/docs/concepts/workloads/controllers/cron-jobs.md +++ b/content/en/docs/concepts/workloads/controllers/cron-jobs.md @@ -44,7 +44,7 @@ Cannot determine if job needs to be started. Too many missed start time (> 100). It is important to note that if the `startingDeadlineSeconds` field is set (not `nil`), the controller counts how many missed jobs occurred from the value of `startingDeadlineSeconds` until now rather than from the last scheduled time until now. For example, if `startingDeadlineSeconds` is `200`, the controller counts how many missed jobs occurred in the last 200 seconds. -A CronJob will be counted as missed if it failed to be created at its scheduled time. For example, If `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed. +A CronJob is counted as missed if it has failed to be created at its scheduled time. For example, If `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed. For example, suppose a cron job is set to start at exactly `08:30:00` and its `startingDeadlineSeconds` is set to 10, if the CronJob controller happens to