diff options
| author | 2020-04-16 18:08:53 +0200 | |
|---|---|---|
| committer | 2020-04-16 18:08:53 +0200 | |
| commit | 475feffdbec733b3d3221276217692bed5f8f090 (patch) | |
| tree | 24395201a6f81fab09d06c6be9703f43090d9024 /cli | |
| parent | 946d9f5535ddc62fb667edd27e57bde419586e23 (diff) | |
Markdownlint (#2880)
* markdownlint
I have started to use
[markdownlint](https://github.com/DavidAnson/markdownlint/) to find
typos in Markdown. Let's discuss which rules to enforce / disable /
customize
* markdownlint cli/readme
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/README.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/README.md b/cli/README.md index b4112bf63..1e9e72d4d 100644 --- a/cli/README.md +++ b/cli/README.md @@ -86,19 +86,21 @@ cd /usr/share/FreshRSS # Optimize database (reduces the size) for a given user (perform `OPTIMIZE TABLE` in MySQL, `VACUUM` in SQLite) ``` -#### Note about cron +### Note about cron Some commands display informations on standard error, cron will send an email with thoses informations every time the command will be executed (exited zero or non-zero). To avoid cron sending email on success: + ```sh @daily /usr/local/bin/my-command > /var/log/cron-freshrss-stdout.log 2>/var/log/cron-freshrss-stderr.log || cat /var/log/cron-freshrss-stderr.log ``` Explanations: -- _/usr/local/bin/my-command > /var/log/cron-freshrss-stdout.log_ : redirect the standard output to a log file -- _/usr/local/bin/my-command 2> /var/log/cron-freshrss-stderr.log_ : redirect the standard error to a log file -- _|| cat /var/log/cron-freshrss-stderr.log_ : if the exit code of _/usr/local/bin/my-command_ is non-zero, then it send by mail the content error file. + +* `/usr/local/bin/my-command > /var/log/cron-freshrss-stdout.log`_ : redirect the standard output to a log file +* `/usr/local/bin/my-command 2> /var/log/cron-freshrss-stderr.log` : redirect the standard error to a log file +* `|| cat /var/log/cron-freshrss-stderr.log_ : if the exit code of _/usr/local/bin/my-command` is non-zero, then it send by mail the content error file. Now, cron will send you an email only if the exit code is non-zero and with the content of the file containing the errors. |
