Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    kopano cleanup über cron ausführen lassen

    Kopano Groupware Core
    3
    3
    248
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • be1001
      be1001 last edited by

      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=90
      

      wenn 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 directory
      

      e-crontab

      # 20 20 * * * python3 kopano-cleanup.py --user daniel --folder=Inbox --days=90 #test
      chrizzibaer 1 Reply Last reply Reply Quote 0
      • chrizzibaer
        chrizzibaer @be1001 last edited by

        @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 :-)

        umgfoin 1 Reply Last reply Reply Quote 0
        • umgfoin
          umgfoin @chrizzibaer last edited by umgfoin

          gentlemen,
          the forum-language is English.

          locate kopano-cleanup.py
          /usr/share/python-kopano/kopano-cleanup.py
          

          use either:
          cd /usr/share/python-kopano/ && python3 ./kopano-cleanup.py [args]
          or:
          python3 /usr/share/python-kopano/kopano-cleanup.py [args]

          Remember crontab -e works on the current user’s crontab
          Depending on your setup, a crontab -e -uotheruser might be useful.
          ++umgfoin.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post