Automatically Delete Files

Hello OwnCloud Community.

Just installed OwnCloud in AWS and love it. The plan is to use it as an external file transfer site between employees and customers.

I am looking to automate deletion of files, Anything older than 30 or 60 days gets deleted. After poking around within the server, I found the directory that stores the data and can delete and I can create a cron job or automated script to delete the files. The problem is after you delete a file from that directory, it doesn't seem to update on the web interface...

Is there a better way to do this?

From what i know the data folder on the server should be kept untouched as you will get a discrepancy between the files on the filesystem and the metadata of those files in the database.

Its probably better to use the WebDAV interface of ownCloud with a command line client capable of doing WebDAV requests to delete those files.