Exemple #1
0
 /**
  * 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();
 }
Exemple #2
0
 /**
  * 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('* * * * *');
 }
Exemple #3
0
 /**
  * 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();
 }
 /**
  * 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();
 }
Exemple #5
0
 /**
  * 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();
 }
Exemple #6
0
 /**
  * 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();
 }
Exemple #7
0
 /**
  * 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
 }
Exemple #8
0
 /**
  * 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');
 }
Exemple #9
0
 /**
  * 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();
 }
Exemple #10
0
 /**
  * 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();
 }
 /**
  * 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 * * *');
 }
Exemple #12
0
 /**
  * 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');
 }
Exemple #13
0
 /**
  * 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('*****@*****.**')->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();
 }
Exemple #14
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('currencies')->hourly();
     //->sendOutputTo(storage_path('logs/update-active.log'));
     //->emailOutputTo('*****@*****.**')
     //          ->hourly();
 }
Exemple #15
0
 /**
  * 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)){
 }
Exemple #16
0
 /**
  * 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');
 }
Exemple #17
0
 /**
  * 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('sync:caldav --background')->withoutOverlapping()->everyTenMinutes();
     $schedule->command('optimise:meetings --background')->withoutOverlapping()->weekly()->sundays()->at('00:00');
 }
Exemple #18
0
 /**
  * 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 () {
         Log::info('attaching new verified skills started');
         $skills = Skill::whereNotNull('verified_skill_id')->get();
         foreach ($skills as $skill) {
             $jobs = Job::whereHas('skills', function ($query) use($skill) {
                 $query->where('skill_id', $skill->id);
             })->whereHas('verifiedSkills', function ($query) use($skill) {
                 $query->where('verified_skill_id', $skill->verified_skill_id);
             }, '<', 1)->get();
             foreach ($jobs as $job) {
                 $job->verifiedSkills()->attach($skill->verified_skill_id);
             }
         }
     })->daily();
     $schedule->call(function () {
         Log::info('HH parsing started');
         $hhGrabber = $this->app['App\\Helpers\\HeadHunterGrabber'];
         $job = $this->app['App\\Models\\Job'];
         $parser = new Parser([$hhGrabber], $job);
         $parser->parse();
     })->daily();
 }
Exemple #19
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         Cache::put('last-cron', new Carbon(), 5);
     })->everyMinute();
     $schedule->command('inspire')->hourly();
 }
Exemple #20
0
 /**
  * Define the application's command schedule.
  *
  * @param \Illuminate\Console\Scheduling\Schedule $schedule        	
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         $manager = new NoFManager();
         $manager->run();
     })->cron('* * * * *');
 }
Exemple #21
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->call(function () {
         $trip_ids = Trip::where('departure_date', Carbon::today())->lists('id')->toArray();
         Booking::where('status', 'reserved')->whereIn('trip_id', $trip_ids)->delete();
     })->everyMinute();
 }
Exemple #22
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $sendMail = env('MAIL_SEND', false);
     if ($sendMail) {
         $schedule->command('mails:sender')->everyFiveMinutes();
     }
 }
Exemple #23
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('download:contracts')->everyThirtyMinutes();
     $schedule->command('build:index')->dailyAt('04:20');
     $schedule->command('send:mail')->dailyAt('05:40');
     $schedule->command('remove:old-contracts')->dailyAt('01:30');
 }
Exemple #24
0
 /**
  * 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('sms:update');
     $schedule->command('sms:push');
     // $schedule->command('queue:listen');
 }
Exemple #25
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('inspire')->hourly();
     $date = Carbon::now()->toW3cString();
     $environment = env('APP_ENV');
     $schedule->command("db:backup --database=mysql --destination=s3 --destinationPath=/{$environment}/svforum_{$environment}_{$date} --compression=gzip")->twiceDaily(13, 21);
 }
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // fix lumen timezone issue
     date_default_timezone_set(config('app.timezone'));
     $schedule->command('cruise:crawl')->weekly()->saturdays()->at('16:00');
     $schedule->command('cruise:dump')->weekly()->saturdays()->at('20:00');
 }
Exemple #27
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     /**
      * Send Emails
      */
     $schedule->command('queue:work --queue=email')->withoutOverlapping();
 }
Exemple #28
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // :00 :20 :40 Ping all the update URLs for site/variable
     // Limit to Red Butte sites
     $siteCodeContains = ['RB_'];
     // $siteCodeContains = ['RB_', 'PR_', 'LR_'];
     try {
         foreach ($siteCodeContains as $piece) {
             $sites = Site::where('sitecode', 'LIKE', '%' . $piece . '%')->get();
             foreach ($sites as $site) {
                 $series = DB::table('series')->select('variablecode')->where('sitecode', '=', $site->sitecode)->get();
                 foreach ($series as $s) {
                     $sitecode = $site->sitecode;
                     $variablecode = $s->variablecode;
                     $url = url('/sites/' . $site->sitecode . '/' . $s->variablecode . '/update');
                     $schedule->exec("wget -O/dev/null {$url}")->cron('0,20,40 * * * *');
                 }
             }
         }
     } catch (\Exception $ex) {
         // Ignore all exceptions... this will catch if 'php artisan migration' hasn't been done yet
     }
     // :10 :30 :50 Ping the update URLs for cameras
     $url = url('/cameras/update');
     $schedule->exec("wget -O/dev/null {$url}")->cron('10,30,50 * * * *');
 }
Exemple #29
0
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('checkforitems')->daily();
     $schedule->command("scrapehtml")->everyThirtyMinutes();
     $schedule->command("saveboosteraverage")->dailyAt('16:00');
     $schedule->command("scrapegraph")->everyTenMinutes();
 }
Exemple #30
0
 /**
  * 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('backup:clean')->daily()->at('01:00');
     $schedule->command('backup:run')->daily()->at('02:00');
     $schedule->command('backup:monitor')->daily()->at('03:00');
 }