feat: add supercronic to allow running background jobs

This commit is contained in:
Daniel Richter
2024-07-07 23:54:34 +02:00
parent 1b9cf5121b
commit 525e40339b
3 changed files with 20 additions and 0 deletions

View File

@@ -157,6 +157,11 @@ if [[ -n "$PAPERLESS_OCR_LANGUAGES" ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES"
fi
touch /etc/cron.d/export.cron
if [[ -n "$PAPERLESS_EXPORT_CRON" ]]; then
echo "$PAPERLESS_EXPORT_CRON document_exporter /usr/src/paperless/export" > /etc/cron.d/export.cron
fi
initialize
if [[ "$1" != "/"* ]]; then

View File

@@ -17,6 +17,16 @@ stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
environment = HOME="/usr/src/paperless",USER="paperless"
[program:export]
command=/usr/local/bin/supercronic /etc/cron.d/export.cron
user=paperless
startsecs=0
priority=2
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:consumer]
command=python3 manage.py document_consumer
user=paperless