I'm trying to send an e-mail to members on their birthday in my website, created in Laravel. "Scheduled Tasks" seem to be the way to do this in Laravel, so I followed the instructions in their docs and added a call to my function in App\Console\Kernel.php like this:
protected function schedule(Schedule $schedule)
{
$schedule->call($this->birthdayVouchers())->daily();
}
To test this, I can call
php artisan schedule:run
And this works. The e-mails are sent. But now when I want to start some migrations and seeders, the scheduled tasks also run:
php artisan migrate:refresh --seed
Why is that? If I mess something up and have to call this for some reason, I don't want all my members to receive an e-mail every time.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2mBJbfa
via IFTTT
Aucun commentaire:
Enregistrer un commentaire