From: Bernd Bleßmann Date: Wed, 18 May 2022 12:38:32 +0000 (+0200) Subject: Volltext-Suche: Hintergrund-Job nachts aktivieren X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~23 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=eaa42caeb03b5213754334a930b08407a0e74c53;p=kivitendo-erp.git Volltext-Suche: Hintergrund-Job nachts aktivieren --- diff --git a/SL/BackgroundJob/CreateOrUpdateFileFullTexts.pm b/SL/BackgroundJob/CreateOrUpdateFileFullTexts.pm index e354aa17d..055accda3 100644 --- a/SL/BackgroundJob/CreateOrUpdateFileFullTexts.pm +++ b/SL/BackgroundJob/CreateOrUpdateFileFullTexts.pm @@ -22,7 +22,7 @@ my %extractor_by_mime_type = ( ); sub create_job { - $_[0]->create_standard_job('7 * * * *'); # seven minutes after every hour + $_[0]->create_standard_job('20 3 * * *'); # # every day at 3:20 am } # diff --git a/sql/Pg-upgrade2/full_texts_background_job.sql b/sql/Pg-upgrade2/full_texts_background_job.sql new file mode 100644 index 000000000..15a1ec9c6 --- /dev/null +++ b/sql/Pg-upgrade2/full_texts_background_job.sql @@ -0,0 +1,13 @@ +-- @tag: full_texts_background_job +-- @description: Hintergrundjob für tägliche Extraktion von Texten aus Dokumenten +-- @depends: release_3_6_0 + +INSERT INTO background_jobs (type, package_name, active, cron_spec, next_run_at) +VALUES ('interval', 'CreateOrUpdateFileFullTexts', true, '20 3 * * *', + CAST(current_date AS timestamp) + CAST( + (CASE + WHEN extract('hour' FROM current_timestamp) < 2 THEN '3 hours 20 minutes' + ELSE '1 day 3 hours 20 minutes' + END) AS interval + ) +);