Files
Paymenter-Version-Tracks/app/Console/Commands/ScheduleHeartbeatCommand.php
Muhammad Tamir b3933b9960 v1.4.0
2025-11-14 10:59:24 +07:00

39 lines
820 B
PHP

<?php
namespace App\Console\Commands;
use App\Models\CronStat;
use App\Models\Setting;
use Illuminate\Console\Command;
class ScheduleHeartbeatCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:schedule-heartbeat-command';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Heartbeat command to indicate the scheduler is running';
/**
* Execute the console command.
*/
public function handle()
{
Setting::updateOrCreate(
[
'key' => 'last_scheduler_run',
'settingable_type' => CronStat::class,
],
['value' => now()->toDateTimeString()]
);
}
}