Add distribted cron script
This commit is contained in:
parent
be0e93358c
commit
a77e302725
1 changed files with 4 additions and 0 deletions
|
@ -33,9 +33,13 @@ RUN mkdir /etc/service/crond \
|
|||
&& setcap cap_setgid=ep /usr/sbin/crond \
|
||||
&& setcap cap_setuid=ep /usr/sbin/crond
|
||||
|
||||
RUN wget https://git.h2-invent.com/Public-System-Design/Public-Helperscripts/raw/branch/main/distributed_cron.sh -O /distributed_cron.sh \
|
||||
&& chmod +x /distributed_cron.sh
|
||||
|
||||
RUN echo "# Docker Cron Jobs" > /etc/crontabs/nobody \
|
||||
&& echo "* * * * * curl http://localhost:8080/health/check > /dev/null > 2>&1" >> /etc/crontabs/nobody \
|
||||
&& echo "0 1 * * * curl https://open-datenschutzcenter.de/health/check > /dev/null > 2>&1" >> /etc/crontabs/nobody \
|
||||
&& echo "0 9 * * 1-5 /bin/sh /distributed_cron.sh '${WEBDIR}/data/cron_log' 'php ${WEBDIR}/bin/console app:cron' >/dev/null 2>&1" >> /etc/crontabs/nobody \
|
||||
&& chown nobody:nobody /etc/crontabs/nobody \
|
||||
&& chmod +x /etc/crontabs/nobody
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue