當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Scheduling\Schedule類代碼示例

本文整理匯總了PHP中Illuminate\Console\Scheduling\Schedule的典型用法代碼示例。如果您正苦於以下問題:PHP Schedule類的具體用法?PHP Schedule怎麽用?PHP Schedule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Schedule類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         $handler = new App\AlertHandler(new App\Curl());
         $handler->sendAlertEmails(env('ALERT_FETCH_RANGE'));
     })->thenPing(env('ALERT_SEND_HEARTBEAT'))->everyMinute();
 }
開發者ID:GregKaleka,項目名稱:CommutePop,代碼行數:13,代碼來源:Kernel.php

示例2: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('inspire')->hourly();
     //         $schedule->call(function (){
     //         	IpLocation::detectAllLocation();
     //         })->cron('* * * * *');
 }
開發者ID:roslairy,項目名稱:roslairy,代碼行數:13,代碼來源:Kernel.php

示例3: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // $schedule->command('inspire')->hourly();
     // $schedule->call('App\Http\Controllers\WelcomeController@testMail')->everyFiveMinutes();
     $schedule->call('App\\Http\\Controllers\\API\\ShippingAPIController@autoCheckWaybill')->everyFiveMinutes();
     $schedule->call('App\\Http\\Controllers\\API\\MailAPIController@registerInvitationMail')->everyFiveMinutes();
 }
開發者ID:ardiqghenatya,項目名稱:koptel2,代碼行數:13,代碼來源:Kernel.php

示例4: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule $schedule
  *
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $prefix = Carbon::now()->format('Y/m/d/');
     $schedule->command('backup:run --only-db --prefix="db/' . $prefix . '"')->hourly();
     $schedule->command('backup:run --prefix="files/' . $prefix . '"')->weekly();
     $schedule->command('backup:clean')->daily();
 }
開發者ID:armandolazarte,項目名稱:amsrental-presupuestos,代碼行數:14,代碼來源:Kernel.php

示例5: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('inspire')->hourly();
     //tsipizic check
     $schedule->call(function () {
     })->everyFiveMinutes();
 }
開發者ID:pkoro,項目名稱:webconf-portal,代碼行數:13,代碼來源:Kernel.php

示例6: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // get jobs
     $schedule->command('queue:work')->everyFiveMinutes()->withoutOverlapping();
     $schedule->command('tasks:pending')->dailyAt('11:00')->withoutOverlapping();
     $schedule->command('tasks:pending')->everyMinute()->withoutOverlapping();
 }
開發者ID:rlacerda83,項目名稱:task-control,代碼行數:13,代碼來源:Kernel.php

示例7: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // $schedule->command('inspire')
     //          ->hourly();
     $schedule->command('alert:artist')->daily()->appendOutputTo('storage\\logs\\sendRep.txt');
     //Send mail alerting artist
 }
開發者ID:Legolas000,項目名稱:PaintBuddy,代碼行數:13,代碼來源:Kernel.php

示例8: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // $schedule->call(function(){
     //     Reader::index();
     // })->everyFiveMinutes();
     $schedule->command('news:update')->everyThirtyMinutes()->sendOutputTo(storage_path() . '/logs/news/news_updater.log');
 }
開發者ID:ericmller29,項目名稱:thesportsnews,代碼行數:13,代碼來源:Kernel.php

示例9: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     //Change valid status of all tickets that no longer qualify as valid
     $schedule->call(function () {
         DB::table('tickets')->where('dateofdeparture', '<=', Carbon::now())->update(['valid' => 0]);
     })->everyMinute();
     //Decrement credits from users that have newly invalid tickets that are still tradable and mark them untradable once complete
     $schedule->call(function () {
         $where["valid"] = '0';
         $where["tradable"] = '1';
         $tickets = DB::table('tickets')->where($where)->get();
         foreach ($tickets as $ticket) {
             //Determine the credit value on the class of the ticket to set the decrement amount
             switch ($ticket->class) {
                 case 'Economy':
                     $ticketValue = 1;
                     break;
                 case 'Business':
                     $ticketValue = 2;
                     break;
                 case 'First':
                     $ticketValue = 3;
                     break;
                 case 'Premium':
                     $ticketValue = 4;
                     break;
                 default:
                     $ticketValue = 1;
                     break;
             }
             DB::table('credits')->where('user_id', $ticket->user_id)->decrement('trade', $ticketValue);
             DB::table('tickets')->where('id', $ticket->id)->update(['tradable' => 0]);
         }
     })->everyMinute();
 }
開發者ID:HAASLEWER,項目名稱:airbook,代碼行數:41,代碼來源:Kernel.php

示例10: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         $twitterController = new TwitterController();
         $twitterController . daemonServiceTrends();
     })->everyFiveMinutes();
 }
開發者ID:jlightyear,項目名稱:bootcampinc,代碼行數:13,代碼來源:Kernel.php

示例11: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('inspire')->hourly();
     $schedule->call(function () {
         \App\Http\Controllers\DepressionController::sendEmail();
     })->cron('0 0,4,8,12,16,20 * * *');
 }
開發者ID:botchagalupe,項目名稱:AreYouDepressed-,代碼行數:13,代碼來源:Kernel.php

示例12: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('inspire')->hourly();
     $schedule->command('ltd:sendscheduled')->everyFiveMinutes();
     $schedule->command('ltd:notifynotetaker')->dailyAt('05:00');
     $schedule->command('ltd:notifypaused')->dailyAt('05:00');
 }
開發者ID:skibradshaw,項目名稱:sailschoolos,代碼行數:13,代碼來源:Kernel.php

示例13: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         Mail::raw('Hi Dries!', function ($message) {
             $message->from(env('MAIL_FROM'), env('MAIL_NAME'));
             $message->to('driesvanschevensteen@me.com')->subject('Test mail!');
         });
     })->daily();
     $schedule->call(function () {
         $expiringAuctions = Auction::getExpiringAuctions();
         foreach ($expiringAuctions as $auction) {
             $bidders = Bid::getBiddersWithId($auction->id);
             $highest = Bid::getHighestBidWithId($auction->id);
             $auction->buyer_id = $highest->id;
             $auction->save();
             foreach ($bidders as $bidWithBidder) {
                 $bidder = $bidWithBidder->user;
                 if ($bidder->id = $highest->id) {
                     Mail::raw('Auction ' . $auction->title . ' ended, you are the highest bidder!', function ($message) use($bidder) {
                         $message->from(env('MAIL_FROM'), env('MAIL_NAME'));
                         $message->to($bidder->email)->subject('You are the highest bidder.');
                     });
                 } else {
                     Mail::raw('Auction ' . $auction->title . ' ended, you did not give the highest bid!', function ($message) use($bidder) {
                         $message->from(env('MAIL_FROM'), env('MAIL_NAME'));
                         $message->to($bidder->email)->subject("Auction ended, you didn't get it.");
                     });
                 }
             }
         }
     })->daily();
 }
開發者ID:DriesVS,項目名稱:landoretti,代碼行數:38,代碼來源:Kernel.php

示例14: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('inspire')->hourly();
     $schedule->command('emails:daily')->daily();
     $schedule->command('motions:rankgeneration')->hourly();
     //            if(!$motion->lastestRank || $motion->lastestRank->created_at['carbon']->diffInMinutes($now) >= Setting::get('motion.minutes_between_rank_calculations',60)){
 }
開發者ID:dwoodard,項目名稱:IserveU,代碼行數:13,代碼來源:Kernel.php

示例15: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     //running queue (every five minutes)
     $schedule->command('run:queue QueueCommand')->everyFiveMinutes();
     //running queue (every five minutes)
     $schedule->command('point:expirequeue PointExpireQueueCommand')->dailyAt('06:00');
 }
開發者ID:ThunderID,項目名稱:SHOP-API,代碼行數:13,代碼來源:Kernel.php


注:本文中的Illuminate\Console\Scheduling\Schedule類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。