Scheduler is a new feature in Laravel 5 designed to simplify tasks that need to be scheduled. All that is required is setting up one cron job that calls php artisan schedule:run and have it run every minute.
Questions tagged [laravel-scheduler]
101 questions
0
votes
1 answer
Laravel Mailable using correct model and then second unwanted email with incorrect model
I have a situation where I am making an FTP connection collecting data, looping through it registering new or finding previous enquiries using firstOrCreate. This is ran on a scheduler every 10mins and I am using Laravel Horizon to manage…

James Parsons
- 895
- 5
- 18
- 36
0
votes
2 answers
Is it possible to ensure that Laravel jobs actually run at round times?
I want to perform certain job exactly at round times, precisely every 30 minutes, for example:
- 00:00
- 00:30
- 01:00
- ...
- 12:00
- 12:30
- 13:00
- ...
In the Kernel.php, I have this job...
$schedule->command('mycommand:sender')
…

Magno Alberto
- 628
- 14
- 27
0
votes
1 answer
Is there a way to pass arguments to Scheduling Queued Jobs in laravel?
I need to run a job in queue, which takes a long time (2 hours around). It checks availability of some certain service. So instead of running one job for two hours, which constantly (every fice mins) makes an API request, I thought to use scheduling…

Gio
- 73
- 2
- 13
0
votes
0 answers
Is there a way to know whether the Command has been triggered manually or from the scheduler?
I would like to have different behaviour if a Command is executed from console and when is executed by the scheduler. Is there a way to check this from the command handle() method?
This is not a duplicate of Detect if running from the command line…

Javier Núñez
- 612
- 1
- 5
- 17
0
votes
1 answer
laravel scheduling not working in windows
I am working on laravel scheduling everything is working fine. My schedule code is below:
public function handle()
{
//
$words = [
'aberration' => 'a state or condition markedly different from the norm',
'convivial' =>…

user
- 51
- 9
0
votes
2 answers
every 10 minute cron job behavior on two task with 8 hours interval
I am using Laravel schedule task and I have two cron jobs:
One has to run at 00:10
And another one at 08:00
I wanted to know if I set my cron job to this:
*/10 * * * * php .../artisan schedule:run
will this run my jobs? what if this cron job run…

Roham Shojaei
- 440
- 4
- 18
0
votes
0 answers
How to scheduler call function when something change in database Laravel 5.4
I'm setting up a new application when something changes in the database; I need to call a function in my background or backend, that function returns some id and data from the database.
Maybe someone can help me write a good cron job.
Laravel…

Hamza Brinsi
- 23
- 10
0
votes
0 answers
Laravel Scheduled Tasks Stopped Running at Midnight
We have two identical Laravel environments, running the exact same configuration even the same Laravel app build.
The backend Laravel worker app has two instances, so we use onOneServer() for each task. The workers are also running Horizon queue.
At…

s1rc
- 1
- 3
0
votes
1 answer
Scheduling tasks in Laravel
I'm building an application on Laravel 5.7 where I'm having a cron job to run following…

Nitish Kumar
- 6,054
- 21
- 82
- 148
0
votes
1 answer
Laravel scheduler strange behavior in prod server
The scheduler is running at strange times, I have config a task to run every minute and locally runs OK, but in prod server runs like repeated at some times.
This is my Kernel.php code
namespace App\Console;
use…

Daniel P.
- 184
- 1
- 3
- 16
0
votes
1 answer
Laravel 5 How can I test scheduler call method
I want to test a scheduler function through console. In kernel.php, I'm calling a controller function like:
$schedule->call('App\Http\Controllers\Administrator\CurrencyController@updatecurrencyDefault')->everyMinute();
From the post…

Niladri Banerjee - Uttarpara
- 2,219
- 8
- 52
- 92
0
votes
1 answer
Laravel: Scheduler not working when specific time is given
Trying to schedule command in Larval:
$schedule->command('Cname')->everyFiveMinutes(); -- Works just fine
But when I give specific day and time like -
$schedule->command('Cname')->weeklyOn(3,'9:10');
or
…

JKLM
- 1,470
- 3
- 28
- 66
0
votes
4 answers
Artisan Schedule run not running all commands
I'm trying to get the Laravel Scheduler to run a couple of commands, however when I run php artisan schedule:run it will only run one of the commands in the kernal.php file.
My Kernal.php file is as follows:
protected $commands = [
];
/**
* Define…

SL Luke
- 1
- 2
0
votes
1 answer
Laravel 5.3 scheduler doesn't run automatically
I'm using Laravel 5.3.26 and cannot set the scheduler to run automatically although i have the cron job ready.
I' ve created a new command ligmena:update, below is the code:

dip
- 189
- 6
- 18
0
votes
0 answers
Laravel schedule:run not executing scheduled commands
I'm not quite understanding how the laravel scheduling and schedule:run are working, at least it is not working the way I'd expect it to.
In app/Console/Kernel.php, a command is scheduled to run every five minutes:
protected function…

pdu
- 10,295
- 4
- 58
- 95