Open mikkelnl opened 4 years ago
Did you restart the cron service?
Did you restart the cron service?
I tried rebooting the container, didn't help... I didn't know cron needs to restart, I thought crontab -e would do that itself... might be wrong though :)
I have a cron job for something else on my Synology and I have just restarted cron after making changes. I never checked if it would work without it but my cron job is doing what I expect so try restarting your cron job. Also make sure that your cron file is not on a memory-only partition and gets deleted after a restart of your NAS.
I have a cron job for something else on my Synology and I have just restarted cron after making changes. I never checked if it would work without it but my cron job is doing what I expect so try restarting your cron job. Also make sure that your cron file is not on a memory-only partition and gets deleted after a restart of your NAS.
A cronjob run by DSM is fine, got them running for other stuff too.
But as far as I know, if I want Paperless to export documents, I have to enter the container, open the Terminal tab in the Synology Docker GIU, start a terminal window, and then enter this command in this terminal window:
/usr/src/paperless/src/manage.py document_exporter /export
So if I'm correct, this can't be done via a DSM cron task, since the command is given inside a terminal window for the container.
Therefor, I tried crontab -e in the container - so not the cron from DSM - but that doesn't seem to work.
I'll keep trying.
My goal: export all documents inside Paperless to nice readable pdf files via the /usr/src/paperless/src/manage.py document_exporter /export command, and have this done every 24 or 48 hours.
Ah! Sorry misunderstood you. Try this here I found on Stackoverflow:
docker exec mycontainer /bin/sh -c "./usr/src/paperless/src/manage.py document_exporter /export"
Put this line in a .sh script for example daily_export.sh. In your cron job let it execute daily_export.sh. I haven't tried this so be careful.
Ah! Sorry misunderstood you. Try this here I found on Stackoverflow:
docker exec mycontainer /bin/sh -c "./usr/src/paperless/src/manage.py document_exporter /export"
Put this line in a .sh script for example daily_export.sh. In your cron job let it execute daily_export.sh. I haven't tried this so be careful.
Awesome, wonder why I didn't think of such a command :D Your cmd line almost works, I had to remove the . in the path, but this should work... going to set the .sh script in the scheduler... thanks again.
Hi!
I'm running Paperless in a docker container on my Synology NAS, which seems to be running fine.
I would like to export alle the documents every night with the 'export' option. When I enter the container via the terminal option in Synology Docker GUI, I can run this command just fine:
/usr/src/paperless/src/manage.py document_exporter /export
So I figured, I'd enter this command in the crontab in this container, via:
crontab -e
There I added this line:
50 23 * * * /usr/src/paperless/src/manage.py document_exporter /export
But it doesn't seem to be executed at all. I'm not very familiar with linux, crontab, etc, so I might be missing something here ;-)
Anyway, does anybody perhaps know a way to automatically export documents periodically?