From fd971884b3eb21e3f8936ff7ac423c95084b87a0 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 15 Mar 2022 16:07:38 +0100 Subject: [PATCH] (bug) do not plan version check at invalid cron --- CHANGELOG.md | 1 + config/schedule.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3de134f..fb876e11f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Updated sidekiq-unique-jobs to 7.1.15 - Removed unmaintained gem sidekiq-cron and replaced it with sidekiq-scheduler - Fix a bug: a sentence was not linked to a translation key +- Fix a bug: the version check may be scheduled at an invalid time - Fix a bug: the moment-timezone relied on an outdated version of moment with a case-sensitive locale file - Fix a security issue: updated image_processing to 1.12.2 to fix [CVE-2022-24720](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24720) - Fix a security issue: updated url-parse to 1.5.10 to fix [CVE-2022-0686](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0686), [CVE-2022-0691](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0691), [CVE-2022-0639](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0639) and [CVE-2022-0512](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0512) diff --git a/config/schedule.yml b/config/schedule.yml index 967ca1ae4..b83e7d469 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -37,9 +37,9 @@ free_disk_space: # schedule a version check, every week at the current day+time # this will prevent that all the instances query the hub simultaneously -<% m = DateTime.current.minute - 1; h = DateTime.current.hour; d = DateTime.current.cwday %> +<% h = DateTime.current - 1.minute %> version_check: - cron: <%="#{m} #{h} * * #{d}" %> + cron: <%="#{h.strftime('%M %H')} * * #{h.cwday}" %> class: VersionCheckWorker queue: system