Skip to content

Commit c4c9bf5

Browse files
chore: use less concurred minute of hour for scheduled jobs (googleapis#26435)
See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule > The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.
1 parent f3463a9 commit c4c9bf5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/codegen.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
on:
22
schedule:
3-
# Runs at 12:30, 1:30 and 2:30.
4-
- cron: '30 0-2 * * *'
3+
# Runs at 12:18, 1:18 and 2:18.
4+
# See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
5+
- cron: '18 0-2 * * *'
56
workflow_dispatch:
67

78
name: codegen
@@ -18,7 +19,7 @@ jobs:
1819
with:
1920
script: |
2021
console.log('checking size of services')
21-
const MAX_SERVICE_SIZE = 300 // 00:30 to 02:30 implies 3 batches of size 100
22+
const MAX_SERVICE_SIZE = 300 // 00:18 to 02:18 implies 3 batches of size 100
2223
const services = ${{ needs.discovery.outputs.services }}
2324
if (services.length > MAX_SERVICE_SIZE) {
2425
throw new Error(`Total services (${services.length}) exceed limit of ${MAX_SERVICE_SIZE}`)

0 commit comments

Comments
 (0)