From c418f62a4aba4a135143527369ad0460ccd9f582 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 12 Nov 2019 07:14:01 +0100 Subject: [PATCH] Fix nextcloud cron --- modules/private/websites/tools/cloud/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix index fffe04c..99add80 100644 --- a/modules/private/websites/tools/cloud/default.nix +++ b/modules/private/websites/tools/cloud/default.nix @@ -177,10 +177,16 @@ in { services.cron = { enable = true; - systemCronJobs = [ + systemCronJobs = let + script = pkgs.writeScriptBin "nextcloud-cron" '' + #! ${pkgs.stdenv.shell} + export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive + export PATH=/run/wrappers/bin:$PATH + ${pkgs.php}/bin/php -f ${nextcloud}/cron.php + ''; + in [ '' - LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive - */15 * * * * wwwrun ${pkgs.php}/bin/php -f ${nextcloud}/cron.php + */15 * * * * wwwrun ${script}/bin/nextcloud-cron '' ]; }; -- 2.41.0