Creating scheduler to notify users of new comics

Now is the time for another superpower feature built into Laravel—scheduling! OK, it does not sound that exciting, but the fact that I can set one cron job on my server to do all my tasks makes it a lot easier to move my features from server to server. I will show here one example of how to use it based on the console command that I made previously.

Getting ready

A base install of Laravel is fine. If you follow the preceding recipe, you will have a decent size command to run via this scheduling example.

How to do it…

  1. In the previous recipe, we ran php artisan make:console GetUsersLatestsFavoritesConsole to get a console command. Then, I added some query work over there to make it do its thing.
  2. I then ...

Get Laravel 5.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.