38 lines
842 B
PHP
38 lines
842 B
PHP
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Symfony\Component\Console\Input\ArrayInput;
|
|
|
|
define('LARAVEL_START', microtime(true));
|
|
|
|
if (PHP_SAPI !== 'cli') {
|
|
http_response_code(403);
|
|
exit('Forbidden');
|
|
}
|
|
|
|
require __DIR__.'/vendor/autoload.php';
|
|
|
|
/** @var Application $app */
|
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
|
|
|
$commands = [
|
|
['command' => 'contacts:sync-carddav'],
|
|
['command' => 'calendar:process-reminders', '--force-sync' => true],
|
|
['command' => 'sms-campaigns:send-due'],
|
|
['command' => 'sms-campaigns:reconcile'],
|
|
['command' => 'sms-campaigns:prune-history'],
|
|
];
|
|
|
|
$status = 0;
|
|
|
|
foreach ($commands as $command) {
|
|
$commandStatus = $app->handleCommand(new ArrayInput($command));
|
|
|
|
if ($commandStatus !== 0) {
|
|
$status = $commandStatus;
|
|
}
|
|
}
|
|
|
|
exit($status);
|