Cron - which reference for volume ?
-
I have a volume set up
/mnt/cctvto 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/cctvit should be ok.
So maybe the latter ? - should the command reference the mount point
-
I have a volume set up
/mnt/cctvto 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/cctvit should be ok.
So maybe the latter ? - should the command reference the mount point
-
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.
@fbartels thank you, that answers the question : should be
/media/cctvthenWhen Cloudron sets up a volume on the server, it asks you to put it in
/mnt
But the app references this as/mediain the Storage of app config.
Maybe I am not understanding fully about Cloudron volume creation / management -
@fbartels thank you, that answers the question : should be
/media/cctvthenWhen Cloudron sets up a volume on the server, it asks you to put it in
/mnt
But the app references this as/mediain the Storage of app config.
Maybe I am not understanding fully about Cloudron volume creation / management@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. -
@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. -
N nebulon marked this topic as a question on
-
N 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