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,7 +2,7 @@
|
||||
|
||||
namespace App\Console\Cron;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use App\Contracts\CronCommand;
|
||||
use App\Events\CronWeekly;
|
||||
|
||||
/**
|
||||
@@ -11,7 +11,7 @@ use App\Events\CronWeekly;
|
||||
*
|
||||
* The actual cron tasks are in app/Cron
|
||||
*/
|
||||
class Weekly extends Command
|
||||
class Weekly extends CronCommand
|
||||
{
|
||||
protected $signature = 'cron:weekly';
|
||||
protected $description = 'Run the weekly cron tasks';
|
||||
@@ -19,7 +19,11 @@ class Weekly extends Command
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
$this->redirectLoggingToFile('cron');
|
||||
$this->callEvent();
|
||||
}
|
||||
|
||||
public function callEvent()
|
||||
{
|
||||
event(new CronWeekly());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user