Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Question about deleting some data through cron
(1 viewing) (1) Guest
"ARI Stream Quiz" WordPress plugin
Go to bottomPage: 1
TOPIC: Question about deleting some data through cron
#71758
Question about deleting some data through cron 2 Months, 2 Weeks ago Karma: 0
Hi, a long time ago I asked you a question about my DB becoming big because of wp_asq_quiz_sessions. And you gave me this code, so I can put it in my cron. And it works:

"DELETE FROM wp_asq_quiz_sessions WHERE created < DATE_ADD(CURDATE(), INTERVAL -2 DAY)"

However, I have this cron working once every 7 days. And now too many people are passing quizzes, so the db becomes heavy very quickly.

My question is: if I'll make the cronjob to work once a day (every day), then the code above will work normally? Or should I choose bigger interval? If yes, then what is a minimal interval?
The administrator has disabled public write access.
 
#71762
Re:Question about deleting some data through cron 2 Months, 1 Week ago Karma: 748
Hello,

This query deletes records older than 2 days. You can increase "2" in the query If it is not enough.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#71768
Re:Question about deleting some data through cron 2 Months, 1 Week ago Karma: 0
No, I am asking "if I'll make the cronjob to work once a day (every day), then the code above will work normally?". I don't need these records at all, because I don't collect any data from users, that pass my quizzes.

Tbh, I don't understand, what records are making the db grow, if I don't collect any data. And it would be useful, if you add autodeletion of this records in your plugin's settings.
The administrator has disabled public write access.
 
#71787
Re:Question about deleting some data through cron 2 Months ago Karma: 748
Yes, the code will work fine if run query once a day. It seems in some cases (depend on plugin/quiz configuration) don't need add a record to "session" DB table. We will investigate it.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1