Files
kulakpos_web/public/restaurant/app/Console/Commands/RunInvoiceJobLoop.php

35 lines
775 B
PHP
Raw Normal View History

2026-03-15 17:08:23 +07:00
<?php
namespace App\Console\Commands;
use App\Jobs\GenerateMonthlyInvoices;
use Illuminate\Console\Command;
class RunInvoiceJobLoop extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'invoice:loop';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Run GenerateMonthlyInvoices job every 5 seconds (for testing)';
public function handle()
{
$this->info('Starting job loop... Press Ctrl+C to stop.');
// while (true) {
// dispatch(new GenerateMonthlyInvoices);
// $this->info('Job dispatched at '.now());
// sleep(300); // wait 5 seconds
// }
}
}