Fix crontab permissions

This commit is contained in:
iosullivan committed 2026-07-18 15:19:06 +08:00
1 parent c68c19a4c0
commit 898e42e0b7
3 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ RUN chmod 0644 /etc/cron.d/cronjob
RUN crontab /etc/cron.d/cronjob RUN crontab /etc/cron.d/cronjob
# Create the log file to be able to run tail # Create the log file to be able to run tail
RUN touch /var/log/cron.log RUN touch /var/log/cron_python.log
# Run the command on container startup # Run the command on container startup
CMD ["cron","-f" ] CMD ["cron","-f" ]
+4
View File
@@ -3,6 +3,10 @@ import datetime
import os import os
import json import json
# Move to script directory in case it was run elsewhere.
scriptdir = os.path.dirname(os.path.abspath(__file__))
os.chdir(scriptdir)
# Import API key from .env file # Import API key from .env file
api_key=os.environ['API_KEY'] api_key=os.environ['API_KEY']
+1 -1
View File
@@ -1 +1 @@
5 * * * * python3 /usr/cta-archive/archive.py > /proc/1/fd/1 2>/proc/1/fd/2 5 * * * * root python3 /usr/cta-archive/archive.py