Merge pull request #5950 from nextcloud/backport/5424/stable19

[stable19] Make systemd not kill child processes of a cron job when it finishes
This commit is contained in:
Morris Jobke 2021-01-15 09:49:14 +01:00 committed by GitHub
commit 0769a047cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,10 +106,13 @@ This approach requires two files: **nextcloudcron.service** and **nextcloudcron.
[Service]
User=www-data
ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php
ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php
KillMode=process
Replace the user ``www-data`` with the user of your http server and ``/var/www/nextcloud/cron.php`` with the location of **cron.php** in your nextcloud directory.
The ``KillMode=process`` setting is necessary for external programs that are started by the cron job to keep running after the cron job has finished.
Note that the **.service** unit file does not need an ``[Install]`` section. Please check your setup because we recommended it in earlier versions of this admin manual.
**nextcloudcron.timer** should look like this::