add crontab file

This commit is contained in:
Audrey Jensen 2025-04-03 08:24:53 -05:00
parent 52a9d68e6b
commit 20b9100624
Signed by: audrey
SSH Key Fingerprint: SHA256:k+6b1AGMt7Q6374OfeAXUFNe0eFpsUt6eV4biffF06U
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,10 @@
FROM mysql:latest
COPY backup.sh /usr/local/bin/
RUN chmod +x /usr/loca/bin/backup.sh
CMD ["cron","-f"]
FROM mysql:8-debian
RUN apt-get update --allow-unauthenticated --allow-insecure-repositories
RUN apt-get -y install -qq --force-yes cron
RUN echo "Log Start" >> /var/log/cron.log
RUN mkdir /backup
ADD backup.sh /usr/local/bin/
ADD mysqlCron /etc/cron.d/mysqlCron
RUN chmod 0644 /etc/cron.d/mysqlCron
RUN chmod 0744 /usr/local/bin/backup.sh
CMD cron && tail -f /var/log/cron.log

1
mysqlCron Normal file
View File

@ -0,0 +1 @@
50 23 * * * backup.sh >> /var/log/cron.log 2>&1