@@ -36,8 +36,8 @@ rollcron /path/to/repo
3636# Remote repository (auto-clones)
3737rollcron https://github.com/user/my-cron-jobs
3838
39- # Custom pull interval (30 seconds )
40- rollcron https://github.com/user/repo -i 30
39+ # Custom pull interval (5 minutes )
40+ rollcron https://github.com/user/repo --pull-interval 300
4141```
4242
4343## Configuration
5252 cron : " * * * * *" # Cron expression (5 fields)
5353 run : command # Shell command
5454 timeout : 10s # Optional (default: 10s)
55+ concurrency : skip # Optional: parallel|wait|skip|replace (default: skip)
56+ retry : # Optional
57+ max : 3 # Max retry attempts
58+ delay : 1s # Initial delay (default: 1s), exponential backoff
59+ ` ` `
60+
61+ ### Concurrency
62+
63+ Controls behavior when a job is triggered while a previous instance is still running:
64+
65+ | Mode | Behavior |
66+ |------|----------|
67+ | ` parallel` | Run new instance alongside existing one |
68+ | `wait` | Queue new instance to run after current finishes |
69+ | `skip` | Skip this trigger (default) |
70+ | `replace` | Kill running instance, start new one |
71+
72+ # ## Retry
73+
74+ Jobs can automatically retry on failure with exponential backoff :
75+
76+ ` ` ` yaml
77+ retry:
78+ max: 3 # Retry up to 3 times
79+ delay: 2s # Initial delay (doubles each retry: 2s, 4s, 8s)
5580` ` `
5681
5782# ## Cron Expression
@@ -95,14 +120,14 @@ Jobs run in their own snapshot directories, so git pulls don't interfere with ru
95120## CLI Reference
96121
97122```
98- rollcron [ OPTIONS] [ REPO]
123+ rollcron [ OPTIONS] < REPO >
99124
100125Arguments:
101- [ REPO] Local path or remote URL [ default: . ]
126+ < REPO > Local path or remote URL (required)
102127
103128Options:
104- -i, -- interval <SECS > Pull interval in seconds [ default: 60 ]
105- -h, --help Print help
129+ --pull- interval <SECS > Pull interval in seconds [ default: 3600 ]
130+ -h, --help Print help
106131```
107132
108133## Example: GitHub Actions-style Workflow
@@ -116,18 +141,23 @@ jobs:
116141 run: |
117142 npm install
118143 npm test
144+ retry:
145+ max: 2
146+ delay: 30s
119147
120148 deploy:
121149 name: "Deploy to Production"
122150 schedule:
123151 cron: "0 0 * * *"
124152 run: ./deploy.sh
125153 timeout: 10m
154+ concurrency: skip # Don't deploy if previous deploy is running
126155
127156 cleanup:
128157 schedule:
129158 cron: "0 3 * * 0"
130159 run: find /tmp -mtime +7 -delete
160+ concurrency: replace # Kill old cleanup, start fresh
131161```
132162
133163## License
0 commit comments