Log to console for propper container logging

This commit is contained in:
Niklas Mueller 2024-07-15 15:32:42 +02:00
parent 572984d65b
commit 978a76a402

View file

@ -3,9 +3,7 @@
* * * * * echo "Cronjob running..." >> /var/log/cron.log 2>&1 * * * * * echo "Cronjob running..." >> /var/log/cron.log 2>&1
# runner.py to transcribe the text and send it to the callback_url # runner.py to transcribe the text and send it to the callback_url
* * * * * /usr/local/bin/python /app/runner.py >> /var/log/cron.log 2>&1 * * * * * /usr/local/bin/python /app/runner.py
# * * * * * bash -l -c '/usr/local/bin/python /app/runner.py >> /var/log/cron.log 2>&1'
# An empty line is required at the end of this file for a valid cron file.
# Log cleanup # Log cleanup
1 0 * * * mv /var/log/cron.log /var/log/$(date -d "yesterday 13:00" -I)_cron.log 1 0 * * * mv /var/log/cron.log /var/log/$(date -d "yesterday 13:00" -I)_cron.log
@ -14,3 +12,4 @@
1 0 * * * mv /var/log/uvicorn.log /var/log/$(date -d "yesterday 13:00" -I)_uvicorn.log 1 0 * * * mv /var/log/uvicorn.log /var/log/$(date -d "yesterday 13:00" -I)_uvicorn.log
3 1 * * * find /var/log/*_uvicorn.log -type f -mtime +7 -delete 3 1 * * * find /var/log/*_uvicorn.log -type f -mtime +7 -delete
# An empty line is required at the end of this file for a valid cron file.