#!/usr/bin/env php make(Kernel::class); // Run a null artisan thing just so Laravel internals can be setup properly $status = $kernel->handle( $input = new Symfony\Component\Console\Input\ArrayInput([ 'command' => 'version', ]), new Symfony\Component\Console\Output\NullOutput() ); /** @var Cron $cron */ $cron = app(Cron::class); $run = $cron->run(); echo json_encode([ 'count' => count($run), 'tasks' => $run, ]);