Cron - which reference for volume ?
-
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 ? - 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/cctv
thenWhen 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 -
@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. -
-