Automatisches Löschen von Dateien, älter als 21Tage

Guten Tag,

Auftrag:
Ich nutze die Cloud als Videoüberwachungsspeicher. Nun werden dort täglich tausende Videos mit einer Größe von mehreren GB gespeichert. Nach ca 1,5 Monaten ist der Speicher voll.

Idee:
Da die Cloudsoftware solche Funktionen nicht anbietet, habe ich eine Batch (.bat) Datei auf meinem PC geschrieben und als Aufgabenplanung täglich damit beauftragt Dateien die älter als 21 Tage sind zu löschen. Das funktioniert auch.

Problem:
Ich will diese Batchdatei oder eine andere Möglichkeit des täglichen löschens unanhängig vom PC ausführen lassen. Kann man die Cloud irgendwie dazu programmieren, diese Batchdatei regelmäßig auszuführen oder anders dazu bringen regelmäßig Videos die älter als 21 Tage sind zu löschen?

beste Grüße

@Lohmann
You should go back to the WD Community and post this under My Cloud Ideas.

This could be done with a cron job. Something like
find /path/to/files* -mtime +21 -exec rm {} ;

Hi rac8006,
are you sure, that the cloud can run the cron job hinself? Idk about cronjobs. How can i use it?

Yes the single bay/single drive My Cloud OS can run Cron jobs. Here is one such past discussion where people indicate a Cron job they created is working for them.

AS Bennor said yes you can run cron jobs on the single drive My Clouds. The gen1 is easier to do than the gen2. If you have a gen1 look at the /etc/cron.d folder along with the other cron folders in /etc.