added crontab

This commit is contained in:
socrates
2023-12-11 13:53:04 +01:00
parent f242ef1681
commit d27a6f1210
2 changed files with 11 additions and 5 deletions

View File

@@ -1,13 +1,16 @@
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y python3-openpyxl python3-selenium python3-pyvirtualdisplay && rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y cron tzdata python3-openpyxl python3-selenium python3-pyvirtualdisplay && rm -rf /var/lib/apt/lists/*
RUN cp -r -f /usr/share/zoneinfo/Europe/Berlin /etc/localtime
COPY . /app/
COPY kill-chrome /app/
COPY parser.py /app/
COPY conf/conf.json /app/conf/
RUN mkdir -p /app/files
RUN mkdir -p /app/log
WORKDIR /app/
CMD ./parser.py
RUN crontab conf/crontab
##CMD [ "crond", "-f" ]

3
conf/crontab Normal file
View File

@@ -0,0 +1,3 @@
# m h dom mon dow cmd
*/5 8-20 * * 1-5 cd /app/ && ./parser.py
0 0 * * * /app/kill-chrome