runGlobalCronJobs(); $serverProfilePersistenceManager = new ServerProfilePersistenceManager(); foreach ($serverProfilePersistenceManager->getProfiles() as $serverProfile) { $cronRunner->runSingleServerProfileActions($serverProfile); } } catch (LAMException $e) { echo escapeshellcmd($e->getTitle()) . "\n"; exit(1); } } elseif ($runGlobalActions) { try { $cronRunner->runGlobalCronJobs(); } catch (LAMException $e) { echo escapeshellcmd($e->getTitle()) . "\n"; exit(1); } } elseif ($runSingleServerProfileActions && !empty($argv[3]) && LAMConfig::isValidName($argv[3])) { try { $cronRunner->runSingleServerProfileActions($argv[3]); } catch (LAMException $e) { echo escapeshellcmd($e->getTitle()) . "\n"; exit(1); } } else { echo "LAM - Run cron jobs\n" . "\n" . "Usage:\n" . "\n" . "Run all cron jobs (global and server profiles):\n" . "\n" . " runCronJobs.sh all\n" . "\n" . "Run all cron jobs (global and server profiles) in dry-run:\n" . "\n" . " runCronJobs.sh all --dry-run\n" . "\n" . "Run all global cron jobs:\n" . "\n" . " runCronJobs.sh global\n" . "\n" . "Run all global cron jobs in dry-run:\n" . "\n" . " runCronJobs.sh global --dry-run\n" . "\n" . "Run cron jobs of a server profile:\n" . "\n" . " runCronJobs.sh serverProfile NAME\n" . "\n" . "Run cron jobs of a server profile in dry-run:\n" . "\n" . " runCronJobs.sh serverProfile NAME --dry-run\n" . "\n" . "Run cron jobs of all server profiles:\n" . "\n" . " runCronJobs.sh allServerProfiles\n" . "\n" . "Run cron jobs of all server profiles in dry-run:\n" . "\n" . " runCronJobs.sh allServerProfiles --dry-run\n" . "\n" . "\n"; }