Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. Cron - which reference for volume ?

Cron - which reference for volume ?

Scheduled Pinned Locked Moved Solved Discuss
5 Posts 3 Posters 845 Views 3 Watching
  • 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.
    • timconsidineT Offline
      timconsidineT Offline
      timconsidine
      App Dev
      wrote on last edited by timconsidine
      #1

      I have a volume set up /mnt/cctv to facilitate access between Homeassistant (capture) and Emby (view).

      I need to delete old cctv videos to avoid unnecessary disk use and keep video lists manageable in the apps.

      I plan to add a cron job like this using variable filename (videos named with format of yymmdd-hhmmss-location.mp4) :

      # *    *    *    *    * command to be executed
      7    4    *    *    *  rm /mnt/cctv/$(date --date "30 days ago" +%y%m%d)-*-*.* 
      

      Question :

      • should the command reference the mount point /mnt/cctv ?
      • or the location known to the app /media/cctv ?

      And will there be a permissions issue ?
      I guess if using /media/cctv it should be ok.
      So maybe the latter ?

      fbartelsF 1 Reply Last reply
      0
      • timconsidineT timconsidine

        I have a volume set up /mnt/cctv to facilitate access between Homeassistant (capture) and Emby (view).

        I need to delete old cctv videos to avoid unnecessary disk use and keep video lists manageable in the apps.

        I plan to add a cron job like this using variable filename (videos named with format of yymmdd-hhmmss-location.mp4) :

        # *    *    *    *    * command to be executed
        7    4    *    *    *  rm /mnt/cctv/$(date --date "30 days ago" +%y%m%d)-*-*.* 
        

        Question :

        • should the command reference the mount point /mnt/cctv ?
        • or the location known to the app /media/cctv ?

        And will there be a permissions issue ?
        I guess if using /media/cctv it should be ok.
        So maybe the latter ?

        fbartelsF Offline
        fbartelsF Offline
        fbartels
        App Dev
        wrote on last edited by
        #2

        Hi @timconsidine,

        maybe I am misunderstanding the problem, but since the cron is executed in the container/app it also need to be working with the path you seen in the container.

        timconsidineT 1 Reply Last reply
        2
        • fbartelsF fbartels

          Hi @timconsidine,

          maybe I am misunderstanding the problem, but since the cron is executed in the container/app it also need to be working with the path you seen in the container.

          timconsidineT Offline
          timconsidineT Offline
          timconsidine
          App Dev
          wrote on last edited by timconsidine
          #3

          @fbartels thank you, that answers the question : should be /media/cctv then

          When Cloudron sets up a volume on the server, it asks you to put it in /mnt
          But the app references this as /media in the Storage of app config.
          Maybe I am not understanding fully about Cloudron volume creation / management

          girishG 1 Reply Last reply
          0
          • timconsidineT timconsidine

            @fbartels thank you, that answers the question : should be /media/cctv then

            When Cloudron sets up a volume on the server, it asks you to put it in /mnt
            But the app references this as /media in the Storage of app config.
            Maybe I am not understanding fully about Cloudron volume creation / management

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by girish
            #4

            @timconsidine said in Cron - which reference for volume ?:

            When Cloudron sets up a volume on the server, it asks you to put it in /mnt

            Yes, correct, but this is purely "internal". AFAIK, this path is never shown in the UI. Maybe we missed some place.

            But the app references this as /media in the Storage of app config.

            As @fbartels said, the cron is run in context of container, so /media/<volumename> is the correct path.

            timconsidineT 1 Reply Last reply
            2
            • girishG girish

              @timconsidine said in Cron - which reference for volume ?:

              When Cloudron sets up a volume on the server, it asks you to put it in /mnt

              Yes, correct, but this is purely "internal". AFAIK, this path is never shown in the UI. Maybe we missed some place.

              But the app references this as /media in the Storage of app config.

              As @fbartels said, the cron is run in context of container, so /media/<volumename> is the correct path.

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by timconsidine
              #5

              @girish Thank you.
              Not a UI issue at all. Just me not quite understanding.
              /media makes sense now.

              1 Reply Last reply
              0
              • nebulonN nebulon marked this topic as a question on
              • nebulonN nebulon has marked this topic as solved on
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search