It looks like one crucial bit of information is missing from the picture: it's not clear what the housekeeping stuff should exactly be. Do you have in mind conditional removal of the "old" data from the database (like, each record has a timestamp, and you'd like to keep only the records younger than such and such age)?