From d1fb5921e20d97621a093a4b57083bfd3ad2dda0 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 24 Aug 2019 11:15:39 -0400 Subject: [PATCH 1/4] Update background_jobs_configuration.rst Adjust nextcloudcron.service to wait for mysql.service dependency before starting. This prevents errors during a reboot. --- .../configuration_server/background_jobs_configuration.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/admin_manual/configuration_server/background_jobs_configuration.rst b/admin_manual/configuration_server/background_jobs_configuration.rst index 0466d34af..58c81d9a7 100644 --- a/admin_manual/configuration_server/background_jobs_configuration.rst +++ b/admin_manual/configuration_server/background_jobs_configuration.rst @@ -96,6 +96,7 @@ This approach requires two files: **nextcloudcron.service** and **nextcloudcron. [Unit] Description=Nextcloud cron.php job + After=mysql.service [Service] User=www-data From e55bbaefae60883d63fd4521318d01676e7dcbec Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 25 Aug 2019 19:22:09 -0400 Subject: [PATCH 2/4] Update background_jobs_configuration.rst Added notes on using different databases. --- .../configuration_server/background_jobs_configuration.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin_manual/configuration_server/background_jobs_configuration.rst b/admin_manual/configuration_server/background_jobs_configuration.rst index 58c81d9a7..5a39372cc 100644 --- a/admin_manual/configuration_server/background_jobs_configuration.rst +++ b/admin_manual/configuration_server/background_jobs_configuration.rst @@ -105,7 +105,8 @@ This approach requires two files: **nextcloudcron.service** and **nextcloudcron. [Install] WantedBy=basic.target -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. +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. +Replace ``mysql.service`` with the name of the database service you are using. Note: ``mysql.service`` controls both the actual MySQL as well as MariaDB on Ubuntu so you can use the above line for either. For PostgreSQL you could use ``After=postgresql.service``. In the case of SQLite simply omit the line. **nextcloudcron.timer** should look like this:: From 473c02e0d6bf38607903cbb33cedb9ff72431126 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 24 Sep 2019 22:57:31 -0400 Subject: [PATCH 3/4] Update background_jobs_configuration.rst --- .../background_jobs_configuration.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/admin_manual/configuration_server/background_jobs_configuration.rst b/admin_manual/configuration_server/background_jobs_configuration.rst index 5a39372cc..c2f426b48 100644 --- a/admin_manual/configuration_server/background_jobs_configuration.rst +++ b/admin_manual/configuration_server/background_jobs_configuration.rst @@ -96,17 +96,13 @@ This approach requires two files: **nextcloudcron.service** and **nextcloudcron. [Unit] Description=Nextcloud cron.php job - After=mysql.service [Service] User=www-data ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php - - [Install] - WantedBy=basic.target 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. -Replace ``mysql.service`` with the name of the database service you are using. Note: ``mysql.service`` controls both the actual MySQL as well as MariaDB on Ubuntu so you can use the above line for either. For PostgreSQL you could use ``After=postgresql.service``. In the case of SQLite simply omit the line. +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:: @@ -127,6 +123,6 @@ Now all that is left is to start and enable the timer by running this command:: systemctl enable --now nextcloudcron.timer -When the option ``--now`` is used with ``enable``, the resp. unit will also be started. +When the option ``--now`` is used with ``enable``, the respective unit will also be started. .. note:: Selecting the option ``Cron`` in the admin menu for background jobs is not mandatory, because once `cron.php` is executed from the command line or cron service it will set it automatically to ``Cron``. From 700db5cc8621578823d9889c0cbcfa1a2e4d12f2 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 24 Sep 2019 23:01:15 -0400 Subject: [PATCH 4/4] Update background_jobs_configuration.rst --- .../configuration_server/background_jobs_configuration.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin_manual/configuration_server/background_jobs_configuration.rst b/admin_manual/configuration_server/background_jobs_configuration.rst index c2f426b48..ec1e7be99 100644 --- a/admin_manual/configuration_server/background_jobs_configuration.rst +++ b/admin_manual/configuration_server/background_jobs_configuration.rst @@ -101,8 +101,9 @@ This approach requires two files: **nextcloudcron.service** and **nextcloudcron. User=www-data ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php -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. -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. +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. + +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::