From 4d788ef710cc79712b92ffea89ce1f2929ae7c16 Mon Sep 17 00:00:00 2001 From: KWON Date: Mon, 30 Jun 2025 12:43:59 +0900 Subject: [PATCH] =?UTF-8?q?cron=EC=9D=84=20=EC=9D=B8=EB=9D=BC=EC=9D=B8?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/Dockerfile | 10 +++++++--- build/crontab.txt | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 build/crontab.txt diff --git a/build/Dockerfile b/build/Dockerfile index a8cbdab..349f3db 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -25,7 +25,11 @@ WORKDIR /data RUN fc-cache -f -v -COPY ./build/crontab.txt /etc/cron.d/autoupload-cron -RUN chmod 0644 /etc/cron.d/autoupload-cron && crontab /etc/cron.d/autoupload-cron +COPY run.sh /data/run.sh +RUN chmod +x /data/run.sh -CMD ["cron", "-f"] +# crontab 등록 +RUN echo "* * * * * /data/run.sh >> /proc/1/fd/1 2>&1" | crontab - +#RUN echo "0 9 * * * /data/run.sh >> /proc/1/fd/1 2>&1" | crontab - + +CMD ["/bin/bash", "-c", "cron -f"] diff --git a/build/crontab.txt b/build/crontab.txt deleted file mode 100644 index c1e2985..0000000 --- a/build/crontab.txt +++ /dev/null @@ -1 +0,0 @@ -0 9 * * * python3 /data/gnu_autoupload.py >> /proc/1/fd/1 2>&1