Title: Quota incorrect
Last modified: August 24, 2016

---

# Quota incorrect

 *  Resolved [Alfrescow](https://wordpress.org/support/users/alfrescow/)
 * (@alfrescow)
 * [11 years ago](https://wordpress.org/support/topic/quota-incorrect/)
 * We had a requirement to automatically delete files after a certain number of 
   days and have set a recurring scheduled event to run on the MYSQL schema and 
   a windows scheduled task to run on the server to do the following
 * 1. Delete all rows in the SQL table where the post_type is buddydrive-file and
   the post is older than 10 days
 * and
 * 2. Empty the BuddyDrive uploads folder for files which are older than 10 days
 * Unfortunately this seems to have screwed up the user quota calculations as one
   user has no buddydrive files but is showing 12% used, when I add a new file it
   does increase and decrease up and down from 12% but not back to 0%
 * Is there some kind of cache that also needs to be cleared as part of this schedule?
 * Has anyone else set this functionality up but in a different way?
 * Thanks
 * [https://wordpress.org/plugins/buddydrive/](https://wordpress.org/plugins/buddydrive/)

Viewing 1 replies (of 1 total)

 *  [Mathieu Viet](https://wordpress.org/support/users/imath/)
 * (@imath)
 * [11 years ago](https://wordpress.org/support/topic/quota-incorrect/#post-6036841)
 * Each user has a user meta having the key `_buddydrive_total_space` you’ll need
   to empty this meta_key for the corresponding users

Viewing 1 replies (of 1 total)

The topic ‘Quota incorrect’ is closed to new replies.

 * ![](https://ps.w.org/buddydrive/assets/icon-256x256.png?rev=3305954)
 * [BuddyDrive](https://wordpress.org/plugins/buddydrive/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddydrive/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddydrive/)
 * [Active Topics](https://wordpress.org/support/plugin/buddydrive/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddydrive/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddydrive/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mathieu Viet](https://wordpress.org/support/users/imath/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/quota-incorrect/#post-6036841)
 * Status: resolved