I've written a plugin that temporarily stores file attachments in a folder for form submissions. I'm writing a function that cleans out that folder if the files are older than a certain date.
I'm wondering what to hook that cleanup function to? Maybe regularly? Like everytime the site gets accessed? I don't know the WP hooks very well yet, so specific suggestions would be awesome. Maybe http://codex.wordpress.org/Plugin_API/Action_Reference/init ?
Ideas?
Thanks.