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
  • Brite
  • 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 - Status | 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 1.6k 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 ?

    Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

    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

        Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

        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.

            Indie app dev, scratching my itches, lover of Cloudron PaaS, communityapps.appx.uk

            1 Reply Last reply
            0
            • nebulonN nebulon marked this topic as a question on
            • nebulonN nebulon has marked this topic as solved on

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            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