From 9d50961cab77eef990d2c932f29dde85abdd4487 Mon Sep 17 00:00:00 2001 From: Steve Dibb Date: Tue, 5 Jan 2010 05:23:00 +0000 Subject: Check if we are running as a cron job git-svn-id: file:///var/svn/portage@63 3218660a-b0cf-4799-a991-8ddcc5b9e0f3 --- import.all.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/import.all.php b/import.all.php index f77760b..aaa4b27 100644 --- a/import.all.php +++ b/import.all.php @@ -2,17 +2,19 @@ require_once 'header.php'; - $sql = "INSERT INTO znurt (action) VALUES ('start_import');"; - $db->query($sql); - ini_set('memory_limit', -1); $verbose = true; - if(in_array("-cron", $argv)) + if(in_array("-cron", $argv)) { $verbose = false; + $cron = true; + } -// print_r($argv); die; + if($cron) { + $sql = "INSERT INTO znurt (action) VALUES ('start_import');"; + $db->query($sql); + } $base = true; $packages = true; -- cgit v1.2.3-65-gdbad