Indatus / dispatcher

Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.
MIT License
1.06k stars 70 forks source link

Different times in different environments #128

Closed pulkitjalan closed 9 years ago

pulkitjalan commented 9 years ago

Is there any way to schedule the same command to run at different time based on the environment?

bkuhl commented 9 years ago

Yes

    public function schedule(Schedulable $scheduler)
    {
        if (App::environment('production')) {
            # return schedule 1
        } else {
            # return schedule 2
        }
    }
pulkitjalan commented 9 years ago

of course, thanks :+1: