Deleting old files automatically

I have a couple of IP cameras pointed at my WD Mirror Gen2 to record images (using FTP) when they detect motion. It works great…but…

I need a way to delete image files after some interval (about 30 days). I can use the ssh login to setup a find command that deletes the files, but I need to run this command from a cron job daily to delete files older than x days.

The part that has me stumped is making any cron job “persistent”. Any changes to crontab seem to disappear on reboot.

So…what can I do to make a “persistent” cron job? Is there a better way to approach this problem?

Hello there,

I have not tried this, let’s see of another user can share some information or tips on this matter.

By the way, I think this would be a pretty useful supported “app” for the
NAS drives. Some kind of rules-based automated file clean-up would be super
useful in a variety of circumstances. In the mean time, I’d appreciate any
suggestions for a sustainable solution.

Thanks!