Fix crontab permissions
This commit is contained in:
1 parent
c68c19a4c0
commit
898e42e0b7
3 files changed
+6
-2
No files matched your search
+1
-1
@@ -23,7 +23,7 @@ RUN chmod 0644 /etc/cron.d/cronjob
|
||||
RUN crontab /etc/cron.d/cronjob
|
||||
|
||||
# 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
|
||||
CMD ["cron","-f" ]
|
||||
@@ -3,6 +3,10 @@ import datetime
|
||||
import os
|
||||
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
|
||||
api_key=os.environ['API_KEY']
|
||||
|
||||
|
||||
Reference in new issue
Block a user