X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44..53593baa211863fbf66540cf1bcc36c8fb37257f:/sql/Pg-upgrade2/full_texts_background_job.sql

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
+  )
+);
