Implementing the database cron cleanup