From da357aa7de018bbfd4ca10c91b49b0b0beeabc3f Mon Sep 17 00:00:00 2001 From: Guilherme Bufolo Date: Wed, 21 Aug 2024 20:10:18 +0200 Subject: [PATCH] =?UTF-8?q?Docker=20compose=20hinzugef=C3=BCgt=20und=20cro?= =?UTF-8?q?njob=20auf=202=20Termine=20erweitert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cfg/check_next_2_days.json | 6 ++++++ docker/crontab | 4 +++- docker/docker-compose.yaml | 11 +++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 cfg/check_next_2_days.json create mode 100644 docker/docker-compose.yaml diff --git a/cfg/check_next_2_days.json b/cfg/check_next_2_days.json new file mode 100644 index 0000000..74fcce5 --- /dev/null +++ b/cfg/check_next_2_days.json @@ -0,0 +1,6 @@ +{ + "header": "Es gibt noch offene Thekendienste für die nächsten 2 Tage\\!\nWer kann bitte im [Kalender](https://teamup.com/ksp4hsa93c1nt5kmym) eintragen und im 'HOBBYHIMMEL Thekenhelden' chat melden\\.\n\n", + "start_date": null, + "end_date": null, + "days_to_check": 2 +} diff --git a/docker/crontab b/docker/crontab index 0266ec4..61425cc 100644 --- a/docker/crontab +++ b/docker/crontab @@ -1,5 +1,7 @@ # Runs every sunday at 16:00 -0 16 * * 0 /usr/local/bin/python3 /app/reportMissingThekendienst.py /app/base_config.json /app/check_next_7_days.json > /app/thekendienstbot_week.txt +0 21 * * 0 /usr/local/bin/python3 /app/reportMissingThekendienst.py /app/cfg/base_config.json /app/cfg/check_next_7_days.json > /app/log/thekendienstbot_week.txt + +15 11 * * * /usr/local/bin/python3 /app/reportMissingThekendienst.py /app/cfg/base_config.json /app/cfg/check_next_2_days.json > /app/log/thekendienstbot_2days.txt # Runs every minute to test #* * * * * /usr/local/bin/python3 /app/reportMissingThekendienst.py /app/base_config.json /app/check_next_7_days.json > /app/thekendienstbot_min.txt diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml new file mode 100644 index 0000000..ce512fc --- /dev/null +++ b/docker/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + thekendienstbot: + image: thekendienstbot:latest + container_name: thekendienstbot + environment: + - TZ=Europe/Berlin + volumes: + - /home/hobbyadmin/ThekendienstBot/cfg/:/app/cfg/ + - /home/hobbyadmin/ThekendienstBot/src/reportMissingThekendienst.py:/app/reportMissingThekendienst.py + - /home/hobbyadmin/ThekendienstBot/docker/crontab:/etc/cron.d/crontab +