From 910faff3e5d309d0b9fba4a6aafa476a4c3fd09d Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 17 Mar 2021 00:56:15 +0100 Subject: [PATCH] Add cron job --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b49b4b..a57b715 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,10 +29,10 @@ RUN apt-get update \ # && echo "apc.enable=1" >> /usr/local/etc/php/glenux-apcu.ini \ # && docker-php-ext-enable apcu -# apt-get install -q -y cron && \ -# apt-get clean +RUN apt-get install -q -y cron \ + && apt-get clean -# RUN echo "*/15 * * * * root su -l www-data -s /bin/bash -c 'php -f /var/www/html/cron.php' > /dev/null 2>&1" >> /etc/crontab +RUN echo "*/5 * * * * root su -l www-data -s /bin/bash -c 'php -d memory_limit=1024M -f /var/www/html/cron.php' > /dev/null 2>&1" >> /etc/crontab # CMD cron && apache2-foreground