Skip to content

Commit

Permalink
return any errors during update_cron execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Commifreak committed Sep 27, 2023
1 parent 87a78af commit bd99ef4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/scripts/checkCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@

echo "Checking cron." . PHP_EOL;

$abSettings = new ABSettings();
list($code, $out) = $abSettings->checkCron();

if ($code == 0) {
echo "Checking cron succeeded!" . PHP_EOL;
} else {
echo "Error occurred: " . implode('; ', $out);
try {
$abSettings = new ABSettings();
list($code, $out) = $abSettings->checkCron();

if ($code == 0) {
echo "Checking cron succeeded!" . PHP_EOL;
} else {
echo "Error occurred: " . implode('; ', $out);
}
} catch (Exception $e) {
echo "Exception occurred! => " . print_r($e->getMessage());
exit(1);
}


Expand Down

0 comments on commit bd99ef4

Please sign in to comment.