Script to automatically delete recorded meetings from server (Jitsi Meet quick install)

Hello. I wanted to ask you, maybe you know or maybe you wrote some script for jitsi meet for automatically remove the recorded meetings video from the server? I mean i have a quick install jitsi meet instance and i want that for example the meeting was recorded, and after one week or something like that it will be deleted automatically? Waiting for your reply! Because it would be a usefull script.

You can run the following commands once a day with cron

REC="/your/recording/folder"

find $REC -type f -cmin +10080 -delete
find $REC -empty -delete

but i need to instal firstly this cron? Maybe you can a little bit guide me? Because i’m new at cron and don’t know much.

Many docs on Internet. Search for “linux cron

Or simply copy those contents to a file and put it under /etc/cron.daily directory

Make sure the file has executable permissions.

And btw this is not a jitsi related question, but general linux.

Be careful, if you make a mistake (for example using an empty REC), you lose everything

you mean for example if my folder for recording is /srv/recordings i will loose all this folder or what?

You will lose all files older than 1 week in a given folder.