forked from GithubBackups/healthchecks
Change "--output" to "-o" in curl examples.
This commit is contained in:
parent
bd3f150284
commit
a3b58d25ff
@ -42,7 +42,7 @@ increasingly important as you add more checks to your account.</p>
|
|||||||
after the command:</p>
|
after the command:</p>
|
||||||
<div class="highlight"><pre><span></span><code>$ crontab -e
|
<div class="highlight"><pre><span></span><code>$ crontab -e
|
||||||
<span class="c1"># m h dom mon dow command</span>
|
<span class="c1"># m h dom mon dow command</span>
|
||||||
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&&</span> curl -fsS --retry <span class="m">3</span> --output /dev/null PING_URL
|
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&&</span> curl -fsS --retry <span class="m">3</span> -o /dev/null PING_URL
|
||||||
</code></pre></div>
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
@ -73,11 +73,12 @@ there is an error. Feel free to adjust the curl options to suit your needs.</p>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>-s, --silent</th>
|
<th>-s, --silent</th>
|
||||||
<td>Silent or quiet mode. Don't show progress meter or error messages.</td>
|
<td>Silent or quiet mode. Use it to hide progress meter,
|
||||||
|
but it also hides error messages.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>-S, --show-error</th>
|
<th>-S, --show-error</th>
|
||||||
<td>When used with -s it makes curl show error message if it fails.</td>
|
<td>Re-enables error messages when -s is used.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>--retry <num></th>
|
<th>--retry <num></th>
|
||||||
@ -85,14 +86,14 @@ there is an error. Feel free to adjust the curl options to suit your needs.</p>
|
|||||||
If a transient error is returned when curl tries to perform a
|
If a transient error is returned when curl tries to perform a
|
||||||
transfer, it will retry this number of times before giving up.
|
transfer, it will retry this number of times before giving up.
|
||||||
Setting the number to 0 makes curl do no retries
|
Setting the number to 0 makes curl do no retries
|
||||||
(which is the default). Transient error means either: a timeout,
|
(which is the default). Transient error is a timeout or an HTTP 5xx
|
||||||
an FTP 4xx response code or an HTTP 5xx response code.
|
response code.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>> /dev/null</th>
|
<th>-o /dev/null</th>
|
||||||
<td>
|
<td>
|
||||||
Redirect curl's stdout to /dev/null (error messages go to stderr,)
|
Redirect curl's stdout to /dev/null (error messages still go to stderr)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -109,4 +110,4 @@ there is an error. Feel free to adjust the curl options to suit your needs.</p>
|
|||||||
</span>System clock synchronized: yes
|
</span>System clock synchronized: yes
|
||||||
NTP service: active
|
NTP service: active
|
||||||
RTC in local TZ: no
|
RTC in local TZ: no
|
||||||
</code></pre></div>
|
</code></pre></div>
|
@ -41,7 +41,7 @@ after the command:
|
|||||||
```bash
|
```bash
|
||||||
$ crontab -e
|
$ crontab -e
|
||||||
# m h dom mon dow command
|
# m h dom mon dow command
|
||||||
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 --output /dev/null PING_URL
|
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 -o /dev/null PING_URL
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, each time your cron job runs, it will send a HTTP request to the ping URL.
|
Now, each time your cron job runs, it will send a HTTP request to the ping URL.
|
||||||
@ -74,11 +74,12 @@ there is an error. Feel free to adjust the curl options to suit your needs.
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>-s, --silent</th>
|
<th>-s, --silent</th>
|
||||||
<td>Silent or quiet mode. Don't show progress meter or error messages.</td>
|
<td>Silent or quiet mode. Use it to hide progress meter,
|
||||||
|
but it also hides error messages.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>-S, --show-error</th>
|
<th>-S, --show-error</th>
|
||||||
<td>When used with -s it makes curl show error message if it fails.</td>
|
<td>Re-enables error messages when -s is used.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>--retry <num></th>
|
<th>--retry <num></th>
|
||||||
@ -86,14 +87,14 @@ there is an error. Feel free to adjust the curl options to suit your needs.
|
|||||||
If a transient error is returned when curl tries to perform a
|
If a transient error is returned when curl tries to perform a
|
||||||
transfer, it will retry this number of times before giving up.
|
transfer, it will retry this number of times before giving up.
|
||||||
Setting the number to 0 makes curl do no retries
|
Setting the number to 0 makes curl do no retries
|
||||||
(which is the default). Transient error means either: a timeout,
|
(which is the default). Transient error is a timeout or an HTTP 5xx
|
||||||
an FTP 4xx response code or an HTTP 5xx response code.
|
response code.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>> /dev/null</th>
|
<th>-o /dev/null</th>
|
||||||
<td>
|
<td>
|
||||||
Redirect curl's stdout to /dev/null (error messages go to stderr,)
|
Redirect curl's stdout to /dev/null (error messages still go to stderr)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<div class="highlight"><pre><span></span><span class="c1"># m h dom mon dow command</span>
|
<div class="highlight"><pre><span></span><span class="c1"># m h dom mon dow command</span>
|
||||||
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&&</span> curl -fsS --retry <span class="m">3</span> --output /dev/null {{ ping_url }}
|
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&&</span> curl -fsS --retry <span class="m">3</span> -o /dev/null {{ ping_url }}
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# m h dom mon dow command
|
# m h dom mon dow command
|
||||||
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 --output /dev/null PING_URL
|
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 -o /dev/null PING_URL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user