Skip to content

Commit

Permalink
Working on more scheduled job docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 23, 2015
1 parent a117efc commit 98664b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion artisan.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ You may even queue Artisan commands so they are processed in the background by y

In the past, developers have generated a Cron entry for each console command they wished to schedule. However, this is a headache. Your console schedule is no longer in source control, and you must SSH into your server to add the Cron entries. Let's make our lives easier. The Laravel command scheduler allows you to fluently and expressively define your command schedule within Laravel itself, and only a single Cron entry is needed on your server.

Your command schedule is stored in the `app/Console/Kernel.php` file. Within this class you will see a `schedule` method. To help you get started, a simple example is included with the method. You are free to add as many scheduled jobs as you wish to the `Schedule` object.
Your command schedule is stored in the `app/Console/Kernel.php` file. Within this class you will see a `schedule` method. To help you get started, a simple example is included with the method. You are free to add as many scheduled jobs as you wish to the `Schedule` object. The only Cron entry you need to add to your server is this:

* * * * * php /path/to/artisan schedule:run 1>> /dev/null 2>&1

This Cron will call the Laravel command scheduler every minute. Then, Laravel evalutes your scheduled jobs and runs the jobs that are due. It couldn't be easier!

#### Scheduling Closures

Expand Down

0 comments on commit 98664b7

Please sign in to comment.