/** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { $schedule->command('inspire')->hourly(); // Check the statuses of each faucet every hour. $schedule->call(function () { Faucets::checkUpdateStatuses(); })->hourly()->environments('production'); $schedule->command('send-random-tweet')->everyTenMinutes()->environments('production'); }
/** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { $schedule->command('inspire')->hourly(); // Check the statuses of each faucet every hour. $schedule->call(function () { Faucets::checkUpdateStatuses(); })->hourly()->environments('production'); // Schedule a random tweet of a selected faucet every hour. $schedule->call(function () { $user = User::where('is_admin', '=', true)->firstOrFail(); $twitter = new Twitter($user); $twitter->sendRandomFaucetTweet(); })->hourly()->environments('production'); }
public function faucetLowBalance($slug) { Faucets::lowBalance($slug); }