1
0
mirror of https://github.com/nxshock/gron.git synced 2024-11-27 03:41:00 +05:00

Add on error restart options to README

This commit is contained in:
nxshock 2022-03-29 21:44:16 +05:00
parent 7d298e05be
commit 0099dec0ff

View File

@ -7,9 +7,12 @@
1. Create `gron.d` directory 1. Create `gron.d` directory
2. Create job config in `jobs.d/job1.conf` ([TOML](https://en.wikipedia.org/wiki/TOML) format): 2. Create job config in `jobs.d/job1.conf` ([TOML](https://en.wikipedia.org/wiki/TOML) format):
```toml ```toml
Cron = "* * * * *" # cron instructions Cron = "* * * * *" # cron instructions
Command = "echo Hello" # command to execute Command = "echo Hello" # command to execute
Description = "print Hello every minute" # job description Description = "print Hello every minute" # job description
NumberOfRestartAttemts = 3 # number of restart attemts
RestartSec = 5 # the time to sleep before restarting a job (seconds)
RestartRule = "on-error" # Configures whether the job shall be restarted when the job process exits
``` ```
3. Launch `gron` binary 3. Launch `gron` binary
4. HTTP interface available on http://127.0.0.1:9876 4. HTTP interface available on http://127.0.0.1:9876