PDA

View Full Version : Auto repair/optimize Database/Tables (cronejob)


Kraxell
10-04-2010, 01:23 PM
Hello :)

is it possible to create a cronjob, which repair and optimize the database/tables everey x days?

Sorry for my bad english, iam german ^^

Hope anyone can help me :)

Best regards

Kraxell
10-10-2010, 06:55 PM
*puhs*
No1 have an idea?

JamesC70
10-10-2010, 09:10 PM
You have the unzipped files for your forum on your computer, right?

In the AdminCP folder, check the code for repair.php. Copy out the code for the "?do=dorepair" section to a new script (maybe call it cronrepair.php) then adjust to your liking.

Scheduling vB's cronjob to run this script would be done in AdminCP -> Scheduled Tasks.

Kraxell
10-11-2010, 10:08 AM
Is this from line 125 to 135? (// ######################### Start do repair #####################)

Iam not the greatest coder, so i dont know exatly which lines are for this feature :)

Lynne
10-11-2010, 02:16 PM
It is not a good idea to repair your tables just for the sake of it. You should only have to repair them if their are problems.

Kraxell
10-11-2010, 04:07 PM
Hello Lynne,

some peoples mean, that is better when i repair/optimize everey week. isnt it?

Lynne
10-11-2010, 07:52 PM
No. You should only repair/optimize your tables if needed. They will take care of themselves. If your database *needs* to be repaired often, then there is something wrong and you should be talking to your host.