Add separate cron runner that doesn't use proc_open (#1405)
* Add alternative to using the artisan schedule runner * StyleCI fixes * Add additional cron time periods * Style fixes * Typo * Update the web cron to use the new system * Write out JSON for which tasks were run * Rename cron.php to just cron
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
namespace App\Console\Cron;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use App\Contracts\CronCommand;
|
||||
use App\Events\CronHourly;
|
||||
|
||||
/**
|
||||
* This just calls the CronHourly event, so all of the
|
||||
* listeners, etc can just be called to run those tasks
|
||||
*/
|
||||
class Hourly extends Command
|
||||
class Hourly extends CronCommand
|
||||
{
|
||||
protected $signature = 'cron:hourly';
|
||||
protected $description = 'Run the hourly cron tasks';
|
||||
@@ -17,7 +17,11 @@ class Hourly extends Command
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
$this->redirectLoggingToFile('cron');
|
||||
$this->callEvent();
|
||||
}
|
||||
|
||||
public function callEvent()
|
||||
{
|
||||
event(new CronHourly());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user