Skip to content

Commit c110b9b

Browse files
authored
chore: stagger cron timings for vulnfeeds (#4930)
This is our current cron job dependency graph: <img width="821" height="523" alt="image" src="https://github.com/user-attachments/assets/d9c5f416-e9d1-4647-a064-42f89d2cce41" /> As such, the following changes are being made: <b style="font-weight:normal;"><div dir="ltr" style="margin-left:0pt;" align="left"> Cron Job | Approx duration|New Schedule | Logic / Dependency -- | -- | -- | -- debian-copyright-mirror | 5min|0 5 * * * | Move to 5:00 AM to give it a head start. cpe-repo-gen | 30min|15 5 * * * | Starts after the mirror finishes (5:15 AM). nvd-mirror | 2min|5 */2 * * * | Offset by 5 mins (5:05, 7:05, etc.) to avoid the "top of hour" rush. nvd-cve-osv |6-7hrs |0 6,14 * * * | Starts at 6:00 AM once dependencies are done. Shift the second run to 2:00 PM to avoid overlapping with the first. cve5-to-osv |15min |30 5,13 * * * | Offset slightly from nvd-cve-osv to stagger CPU load, but early as cve5 has no dependant crons combine-to-osv | 6min|0 13,21 * * * | Run this ~7 hours after the nvd-cve-osv jobs start. alpine-cve-convert | 1min|17 * * * * | Use a "random" minute like 17 to stay clear of other system tasks. debian-cve-convert |1.5min |47 * * * * | Offset from the Alpine job to keep the hourly load flat. </div></b>
1 parent 636fd59 commit c110b9b

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

deployment/clouddeploy/gke-workers/base/alpine-cve-convert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
cronLastSuccessfulTimeMins: "180"
77
spec:
8-
schedule: "0 * * * *"
8+
schedule: "17 * * * *"
99
concurrencyPolicy: Forbid
1010
jobTemplate:
1111
spec:

deployment/clouddeploy/gke-workers/base/combine-to-osv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
cronLastSuccessfulTimeMins: "90"
77
spec:
8-
schedule: "30 * * * *"
8+
schedule: "30 13,21 * * *"
99
concurrencyPolicy: Forbid
1010
failedJobsHistoryLimit: 3
1111
jobTemplate:

deployment/clouddeploy/gke-workers/base/cpe-repo-gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
cronLastSuccessfulTimeMins: "2880"
77
spec:
8-
schedule: "0 6 * * *"
8+
schedule: "15 5 * * *"
99
concurrencyPolicy: Forbid
1010
jobTemplate:
1111
spec:

deployment/clouddeploy/gke-workers/base/cve5-to-osv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
cronLastSuccessfulTimeMins: "2160"
77
spec:
88
timeZone: Australia/Sydney
9-
schedule: "0 6,13 * * *"
9+
schedule: "30 5,1 * * *"
1010
concurrencyPolicy: Forbid
1111
jobTemplate:
1212
spec:

deployment/clouddeploy/gke-workers/base/debian-copyright-mirror.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
cronLastSuccessfulTimeMins: "2880"
77
spec:
8-
schedule: "0 6 * * *"
8+
schedule: "0 5 * * *"
99
concurrencyPolicy: Forbid
1010
jobTemplate:
1111
spec:

deployment/clouddeploy/gke-workers/base/debian-cve-convert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
cronLastSuccessfulTimeMins: "120"
77
spec:
8-
schedule: "0 * * * *"
8+
schedule: "47 * * * *"
99
concurrencyPolicy: Forbid
1010
jobTemplate:
1111
spec:

deployment/clouddeploy/gke-workers/base/nvd-cve-osv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
cronLastSuccessfulTimeMins: "2160"
77
spec:
88
timeZone: Australia/Sydney
9-
schedule: "0 6,13 * * *"
9+
schedule: "0 6,14 * * *"
1010
concurrencyPolicy: Forbid
1111
jobTemplate:
1212
spec:

deployment/clouddeploy/gke-workers/base/nvd-mirror.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
cronLastSuccessfulTimeMins: "240"
77
spec:
8-
schedule: "0 */2 * * *"
8+
schedule: "5 */2 * * *"
99
concurrencyPolicy: Forbid
1010
failedJobsHistoryLimit: 3
1111
jobTemplate:

0 commit comments

Comments
 (0)