weekly.monday.4am.php 424 Bytes
Newer Older
Ayolo's avatar
Ayolo committed
1
<?php
2 3
if(!isset($argc))
  exit();
Ayolo's avatar
hack  
Ayolo committed
4
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
Ayolo's avatar
Ayolo committed
5

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

$site = new site ();

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

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

Ayolo's avatar
Ayolo committed
18 19


Ayolo's avatar
hack  
Ayolo committed
20
?>