kopano cleanup über cron ausführen lassen
-
Hallo,
ich möchte in einem Postfach bei der Inbox die Mails automatisch auf ein alter von 90 Tagen begrenzen.
Wenn ich den Befehl von der Konsole aus eingebe geht das auch super.python3 kopano-cleanup.py --user daniel --folder=Inbox --days=90wenn ich den Befehl jedoch im crontab eingebe bekomme ich eine Fehler meldung. Was mache ich falsch.
# python3 kopano-cleanup.py --user daniel --folder=Inbox --days=90 # python3: can't open file 'kopano-cleanup.py': [Errno 2] No such file or directorye-crontab
# 20 20 * * * python3 kopano-cleanup.py --user daniel --folder=Inbox --days=90 #test -
@be1001
Hi, ich schätze, du hast einen Speicherort, an dem deine python-datei liegt, die du mit python3 aufrufst.
Wenn die Datei zum Beispiel im /home/user/ verzeichnis liegt würde ich crontab mal ergänzen:
python3 /home/user/kopano-cleanup.py --user daniel …
schätze, crontab startet einfach nicht in dem Verzeichnis, in dem auch deine py-datei abgelegt ist :-) -
gentlemen,
the forum-language is English.locate kopano-cleanup.py /usr/share/python-kopano/kopano-cleanup.pyuse either:
cd /usr/share/python-kopano/ && python3 ./kopano-cleanup.py [args]
or:
python3 /usr/share/python-kopano/kopano-cleanup.py [args]Remember
crontab -eworks on the current user’s crontab
Depending on your setup, acrontab -e -uotherusermight be useful.
++umgfoin.