I recently developing a web service in laravel. I wanna that a function actually in time interval running in the background from a server and its output saving somewhere in a table, something like: Run a function in time interval in jQuery.
Asked
Active
Viewed 988 times
1 Answers
0
Perhaps something for the task/command scheduler.
"Laravel's command scheduler allows you to fluently and expressively define your command schedule within Laravel itself. When using the scheduler, only a single Cron entry is needed on your server. Your task schedule is defined in the app/Console/Kernel.php file's schedule method." - Laravel Docs 5.6 - Task Scheduling - Intro
App\Console\Kernel
:
protected function schedule(Schedule $schedule)
{
$schedule->call(function () {
// something to run every minute here
})->everyMinute();
// artisan command
$schedule->command('some:command')->daily();
// queued job
$schedule->job(new SomeJob)->everyThirtyMinutes();
...
}

lagbox
- 48,571
- 8
- 72
- 83