-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Closed
Description
Laravel 5.2.23
Main issue is that each artisan command executes App\Console\Kernel schedule() method.
On my App\Console\Kernel schedule() method I have next code:
<?php
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @return void
*/
protected function schedule(Schedule $schedule)
{
$user = User::find(1);
if (!empty($user)) {
$schedule->call(function () use ($user) {
$user->changePassword();
})->cron($user->getCron());
}
}Problems:
For example, I need to deploy my project from scratch - I can't do this because when I execute
php artisan migrate
I get an error: ""Table 'users' doesn't exists"". So at present I should comment out body of method shedule(), run migrations, then uncomment body of shedule() method.
Suggestions?
Thanks.
jaketoolson, castarco, nathanphelps and Eugene-Melbourne
Metadata
Metadata
Assignees
Labels
No labels