From f6e5cc30a370de48536a447483708d7d88499c84 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Thu, 22 Jan 2015 16:38:12 +0000 Subject: [PATCH] Suppression du script cron --- scripts/cron.php | 71 ------------------------------------------------ 1 file changed, 71 deletions(-) delete mode 100644 scripts/cron.php diff --git a/scripts/cron.php b/scripts/cron.php deleted file mode 100644 index 33fb2feb..00000000 --- a/scripts/cron.php +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/php - "Aide.", - ) - ); - $opts->parse(); -} catch (Zend_Console_Getopt_Exception $e) { - echo $e->getUsageMessage(); - exit; -} - -//Usage -if(isset($opts->help)) -{ - echo $opts->getUsageMessage(); - exit; -} - -$c = new Zend_Config($application->getOptions()); -$db = Zend_Db::factory($c->profil->db->metier); -Zend_Db_Table::setDefaultAdapter($db); - -$commandesM = new Application_Model_CiblageEnrichissementIdentifiants(); - -$sql = $commandesM->select() - ->where('idProfil != ?', 0) - ->where("dateStart != '0000-00-00 00:00:00'") - ->where("dateStop = '0000-00-00 00:00:00'"); -$result = $commandesM->fetchAll($sql); -if (count($result)>0){ - exit; -} - -//Si pas de traitement en cours alors on lance -$sql = $commandesM->select() - ->where('idProfil != ?', 0) - ->where("dateStart = '0000-00-00 00:00:00'") - ->where("dateStop = '0000-00-00 00:00:00'") - ->order('dateAdded ASC')->limit(1); -$result = $commandesM->fetchAll($sql); -if (count($result)>0) { - $info = $result->current(); - echo "Lancement enrichissement $info->id\n"; - exec('php '.realpath(dirname(__FILE__))."/jobs/enrichissement.php --id ".$info->id." &"); -} \ No newline at end of file