What is the difference between executing these two commands from the console:
php -f cron/cron-minute.php force and the next
php -f cron/cron-minute.php UPD here's the code inside
<?php $force = isset($argv[1]); $pidFile = __FILE__.'.pid'; $pidDate = @file_get_contents($pidFile); if (!$force) { if ($pidDate > date('Ymd H:i:s', time() - 3600)) { print "\n\nProcess already running...\n\n"; exit(); } } file_put_contents($pidFile, date('Ymd H:i:s'), LOCK_EX); require(dirname(__FILE__).'/../packages/Engine/include.2.6.php'); Machine::Get()->eErrorReporting(); if ($force) { Loader::Get()->setMode('debug', true); } // генерируем событие try { $event = Events::Get()->generateEvent('afterCronHour'); if ($force) { // показываем что будем запускать $a = $event->getObserversArray(); foreach ($a as $object) { print 'Observer '.get_class($object)."\n"; } } $event->notify(); } catch (Exception $e) { print $e; } unlink($pidFile); print "\n\ndone.\n\n";
cron-minute.phpor description. What is this product? The "force" argument is passed to the php script and processed there. - Sergiks 1:01 pmif ($force) { ... }? - Deadooshka