diff --git a/Docker/README.md b/Docker/README.md index 5a7e03ce2..8d696a652 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -646,7 +646,7 @@ Remember not pass the `CRON_MIN` environment variable to your Docker run, to avo Example on Debian / Ubuntu: Create `/etc/cron.d/FreshRSS` with: ```text -7,37 * * * * root docker exec --user www-data freshrss php ./app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +7,37 * * * * root docker exec --user www-data freshrss php ./app/actualize_script.php >> /tmp/FreshRSS.log 2>&1 ``` ### Option 3) Cron as another instance of the same FreshRSS Docker image diff --git a/README.fr.md b/README.fr.md index e418b04b5..3625df460 100644 --- a/README.fr.md +++ b/README.fr.md @@ -168,7 +168,7 @@ C’est une bonne idée d’utiliser le même utilisateur que votre serveur Web Par exemple, pour exécuter le script toutes les heures : ```text -8 * * * * php /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +8 * * * * php /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1 ``` ## Exemple pour Debian / Ubuntu @@ -176,7 +176,7 @@ Par exemple, pour exécuter le script toutes les heures : Créer `/etc/cron.d/FreshRSS` avec : ```text -7,37 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +7,37 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1 ``` # Conseils diff --git a/docs/en/admins/08_FeedUpdates.md b/docs/en/admins/08_FeedUpdates.md index 2e5a01e6d..a102d5c4d 100644 --- a/docs/en/admins/08_FeedUpdates.md +++ b/docs/en/admins/08_FeedUpdates.md @@ -30,13 +30,19 @@ It’s advisable that you run the Cron job as your Web server user (often `www-d ### Example on Debian/Ubuntu -To run the updater script every hour, and 10 minutes past the hour: +To run the updater script every hour, at 10 minutes past the hour: Edit `/etc/crontab` and append the following line: ```text -10 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +10 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1 ``` +This will append new log lines to the end of the existing log file. You may want to set up `logrotate` or a similar utility to prevent the logfile from growing too large. + +> FreshRSS error: This PHP script may only be invoked from command line! + +If you receive this error message in the cron job's logs, try replacing `php` with the contents of `which php`, like `/usr/local/bin/php`. + ## Systemd as a trigger Some systems can’t use a Cron job, but they can use systemd. It’s easy to configure it to mimic Cron’s features. diff --git a/docs/en/users/09_refreshing_feeds.md b/docs/en/users/09_refreshing_feeds.md index ed7d380a9..568f66e47 100644 --- a/docs/en/users/09_refreshing_feeds.md +++ b/docs/en/users/09_refreshing_feeds.md @@ -46,9 +46,11 @@ The script is named *actualize_script.php* and is located in the *app* folder. T Here is an example to trigger article update every hour. ```cron -0 * * * * php /path/to/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +0 * * * * php -f /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1 ``` +For further advice on cron, see [the admin instructions for cron](../admins/08_FeedUpdates.md#cron-as-a-trigger). + ## Online cron If you do not have access to the installation server scheduled task, you can still automate the update process. diff --git a/docs/fr/users/03_Main_view.md b/docs/fr/users/03_Main_view.md index fc6b9e337..44a235a91 100644 --- a/docs/fr/users/03_Main_view.md +++ b/docs/fr/users/03_Main_view.md @@ -39,7 +39,7 @@ Ci-dessous vous trouverez un exemple permettant la mise à jour des articles toutes les heures. ```cron -0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1 ``` « Paramètres de configuration du script; Ils sont utilisables simultanément diff --git a/docs/i18n/freshrss.fr.po b/docs/i18n/freshrss.fr.po index 4db817b5c..ba67767ba 100644 --- a/docs/i18n/freshrss.fr.po +++ b/docs/i18n/freshrss.fr.po @@ -8340,8 +8340,8 @@ msgstr "" #. type: Fenced code block (cron) #: en/./users/09_refreshing_feeds.md:48 #, no-wrap -msgid "0 * * * * php /path/to/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1\n" -msgstr "0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1\n" +msgid "0 * * * * php /path/to/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1\n" +msgstr "0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1\n" #. type: Title ## #: en/./users/09_refreshing_feeds.md:52 diff --git a/docs/i18n/templates/freshrss.pot b/docs/i18n/templates/freshrss.pot index 39e3f3f5f..93a680e58 100644 --- a/docs/i18n/templates/freshrss.pot +++ b/docs/i18n/templates/freshrss.pot @@ -7837,7 +7837,7 @@ msgstr "" #: en/./users/09_refreshing_feeds.md:48 #, no-wrap msgid "" -"0 * * * * php /path/to/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log " +"0 * * * * php /path/to/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log " "2>&1\n" msgstr ""