weekly.monday.4am.php 396 Bytes
Newer Older
Ayolo's avatar
Ayolo committed
1
<?php
Ayolo's avatar
hack  
Ayolo committed
2
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
Ayolo's avatar
Ayolo committed
3

Ayolo's avatar
fix  
Ayolo committed
4
$topdir=$_SERVER['SCRIPT_FILENAME']."/../";
Ayolo's avatar
Ayolo committed
5 6 7 8 9 10
require_once($topdir. "include/site.inc.php");

$site = new site ();

echo "==== ".date("d/m/Y")." ====\n";

Ayolo's avatar
Ayolo committed
11 12 13 14 15
echo ">> OPTIMZE TABLES\n";
$req = new requete($site->db, 'SHOW TABLES');
while(list($table)=$req->get_rwo())
  new requete($site->dbrw, 'OPTIMIZE TABLE \''.$table.'\'');

Ayolo's avatar
Ayolo committed
16 17


Ayolo's avatar
hack  
Ayolo committed
18
?>