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

diff --git a/sql/Pg-upgrade2/self_test_background_job.sql b/sql/Pg-upgrade2/self_test_background_job.sql
new file mode 100644
index 000000000..2d9a5e476
--- /dev/null
+++ b/sql/Pg-upgrade2/self_test_background_job.sql
@@ -0,0 +1,12 @@
+-- @tag: self_test_background_job
+-- @description: Hintergrundjob fÃ¼r tÃ¤gliche Selbsttests
+-- @depends: release_2_7_0
+INSERT INTO background_jobs (type, package_name, active, cron_spec, next_run_at)
+VALUES ('interval', 'SelfTest', true, '20 2 * * *',
+  CAST(current_date AS timestamp) + CAST(
+    (CASE
+     WHEN extract('hour' FROM current_timestamp) < 2 THEN '2 hours 20 minutes'
+     ELSE                                                 '1 day 2 hours 20 minutes'
+     END) AS interval
+  )
+);
