Commit 9bd6ff76 authored by Bram Daams's avatar Bram Daams
Browse files

example grace time in readme

parent d2ed905f
Pipeline #37151 passed with stage
in 36 seconds
......@@ -60,7 +60,7 @@ Although above cron job is useful, a more realistic could look like:
```
SHELL=/usr/loca/bin/sch
# super important backup, if this one fails: fix with top priority!
10 8-20/2 * mon-fri backup JOB_ID=db-backups JOB_TAGS=db,backup,my_project /usr/local/bin/run-db-backups
10 8-20/2 * mon-fri backup JOB_ID=db-backups JOB_TAGS=db,backup,my_project JOB_GRACE=5m /usr/local/bin/run-db-backups
```
#### JOB_GRACE interval format
......@@ -79,6 +79,13 @@ You can make use of the following suffixes to specify an interval:
Although days and weeks are accepted, you might want to limit the interval to several hours ;-)
Examples:
| environment variable | grace time |
|----------------------|------------|
| `JOB_GRACE=5m` | 300s |
| `JOB_GRACE=120` | 120s |
| `JOB_GRACE=1h30m` | 5400s |
### Job execution
`sch` takes over the role of the shell. Jobs not containing the `JOB_ID` environment variable are directly executed with `os.system`.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment