Vapor scheduled command doesn't fire email but controllers it does
Hi all, I'm having a little trouble sending mail on vapor via a scheduled command. Basically the command is to send reminder emails out about upcoming appointments. Now the command fires the email if I manually run it on Vapor but letting the scheduler do it, does not fire the email, however it updates the database to say its gone.
@Sinnbeck Yes sorry it is a loop, should have posted the whole snippet. If there is no email address it will just skip to next iteration. I have created my own appointment ensuring the email is true and this script will work and fire the email if I manually run the command however letting the cron run the command, no email is fired but it will save that the reminder is sent.
@Sinnbeck So adding in the logs both vapor-ui and cloud watch don't show anything when using the Log facade manually running the command logs show using $this->info('log here'). Manually running the command via artisan I get :
I have temporary workaround until I have more time to try and resolve this but instead of getting the scheduler to call the artisan command, I have now have the scheduler calling a controller method $schedule->call('App\Http\Controllers\HomeController@sendReminders')->everyFifteenMinutes(); that controller method calls Artisan::call('reminder:bookings'); and the mail gets sent.