diff options
author | 2010-01-05 05:23:00 +0000 | |
---|---|---|
committer | 2010-01-05 05:23:00 +0000 | |
commit | 9d50961cab77eef990d2c932f29dde85abdd4487 (patch) | |
tree | 0812f6137dcccfd2a6a6e24d382b81859db4f11e | |
parent | check for cron job (diff) | |
download | znurt-org-backend-9d50961cab77eef990d2c932f29dde85abdd4487.tar.gz znurt-org-backend-9d50961cab77eef990d2c932f29dde85abdd4487.tar.bz2 znurt-org-backend-9d50961cab77eef990d2c932f29dde85abdd4487.zip |
Check if we are running as a cron job
git-svn-id: file:///var/svn/portage@63 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
-rw-r--r-- | import.all.php | 12 |
1 files 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; |