Skip to content

Commit 7936a46

Browse files
aster-voidclaude
andcommitted
meta: document jitter feature in README
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent a06b36b commit 7936a46

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ jobs:
7878
cron: "* * * * *" # Cron expression (5 fields)
7979
run: command # Shell command
8080
timeout: 10s # Optional (default: 10s)
81+
jitter: 30s # Optional: random delay 0-30s before execution
8182
concurrency: skip # Optional: parallel|wait|skip|replace (default: skip)
8283
working_dir: ./subdir # Optional: working directory (relative to job snapshot dir)
8384
retry: # Optional
8485
max: 3 # Max retry attempts
8586
delay: 1s # Initial delay (default: 1s), exponential backoff
87+
jitter: 500ms # Optional: random variation (default: 25% of delay)
8688
```
8789
8890
### Runner
@@ -104,14 +106,22 @@ Controls behavior when a job is triggered while a previous instance is still run
104106
| `skip` | Skip this trigger (default) |
105107
| `replace` | Kill running instance, start new one |
106108

109+
### Jitter
110+
111+
Random delay to prevent thundering herd problems:
112+
113+
- **Task jitter**: Random delay (0 to `jitter`) before job execution
114+
- **Retry jitter**: Random variation added to backoff delay (defaults to 25% of delay if not specified)
115+
107116
### Retry
108117

109118
Jobs can automatically retry on failure with exponential backoff:
110119

111120
```yaml
112121
retry:
113-
max: 3 # Retry up to 3 times
114-
delay: 2s # Initial delay (doubles each retry: 2s, 4s, 8s)
122+
max: 3 # Retry up to 3 times
123+
delay: 2s # Initial delay (doubles each retry: 2s, 4s, 8s)
124+
jitter: 500ms # Optional: random variation (default: 25% of delay)
115125
```
116126

117127
### Cron Expression
@@ -130,8 +140,9 @@ Examples:
130140
- `0 0 * * *` - daily at midnight
131141
- `0 0 * * 0` - weekly on Sunday
132142

133-
### Timeout
143+
### Duration Format
134144

145+
- `500ms` - 500 milliseconds
135146
- `30s` - 30 seconds
136147
- `5m` - 5 minutes
137148
- `1h` - 1 hour

0 commit comments

Comments
 (0)