From 7e73f19d8c7028c56b71da7bdb3d48a02a0755b9 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Fri, 15 Jul 2022 10:54:14 +0200 Subject: [PATCH] Update url in docs for modern paths and do not silence all curl output In principle the cron task should only output on error which you want to know about. Add curl -s to disable curl progressbar but -S to do show any http errors that occurred. --- modules/cron/docs/cron.md | 4 ++-- modules/cron/templates/croninfo.twig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cron/docs/cron.md b/modules/cron/docs/cron.md index 586898ab3..43066cfae 100644 --- a/modules/cron/docs/cron.md +++ b/modules/cron/docs/cron.md @@ -66,9 +66,9 @@ Now, copy the cron configuration suggested on that page: ```text # Run cron [daily] -02 0 * * * curl --silent "https://YOUR_SERVER/simplesaml/module.php/cron/cron.php?key=RANDOM_KEY&tag=daily" > /dev/null 2>&1 +02 0 * * * curl -sS "https://YOUR_SERVER/simplesaml/module.php/cron/run/daily/RANDOM_KEY" # Run cron [hourly] -01 * * * * curl --silent "https://YOUR_SERVER/simplesaml/module.php/cron/cron.php?key=RANDOM_KEY&tag=hourly" > /dev/null 2>&1 +01 * * * * curl -sS "https://YOUR_SERVER/simplesaml/module.php/cron/run/hourly/RANDOM_KEY" ``` Finally, add it to your crontab by going back to the terminal, and editing with: diff --git a/modules/cron/templates/croninfo.twig b/modules/cron/templates/croninfo.twig index f7f5d9b81..45194f63f 100644 --- a/modules/cron/templates/croninfo.twig +++ b/modules/cron/templates/croninfo.twig @@ -14,7 +14,7 @@ <code id="cronlist"> <br /> {%- for url in urls -%} - # {{ 'Run cron:'|trans }} [{{ url.tag }}]<br />{{ url.int }} curl --silent "{{ url.exec_href }}" > /dev/null 2>&1<br /><br /> + # {{ 'Run cron:'|trans }} [{{ url.tag }}]<br />{{ url.int }} curl -sS "{{ url.exec_href }}"<br /><br /> {%- endfor -%} <br /> </code> -- GitLab