Esempio n. 1
1
 /**
  * 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('down')->evenInMaintenanceMode()->dailyAt('23:00');
     //->when(function () {return true;});//
     // 更新用户等级
     $schedule->call(function () {
         $registrations = Registration::where('state', 0)->where(function ($query) {
             $query->where('registration_date', Carbon::yesterday()->toDateString());
         })->get();
         foreach ($registrations as $registration) {
             $user = $registration->user;
             $user->credit_level -= 1;
             $user->save();
         }
     })->evenInMaintenanceMode()->daily();
     //
     // 重置rest_num
     $schedule->call(function () {
         $doctor_schedules = DocSchedule::where('state', 0)->where(function ($query) {
             $week = [1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saturday', 7 => 'sunday'];
             $query->where('doctoring_date', $week[Carbon::today()->dayOfWeek]);
         })->get();
         foreach ($doctor_schedules as $doctor_schedule) {
             $doctor_schedule->rest_num = $doctor_schedule->total_num;
             $doctor_schedule->save();
         }
     })->evenInMaintenanceMode()->dailyAt('3:00');
     //
     // 离开维护模式
     $schedule->command('up')->evenInMaintenanceMode()->dailyAt('7:00');
     //
 }
Esempio n. 2
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('proxy:check')->twiceDaily();
     $schedule->command('proxy:fetch')->twiceDaily()->after(function () {
         Artisan::call('proxy:security');
     });
 }
Esempio n. 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->command('backup:clean')->daily()->at('01:00');
     $schedule->command('backup:run')->daily()->at('02:00');
     $schedule->command('backup:monitor')->daily()->at('03:00');
 }
 /**
  * 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:database')->daily();
     $schedule->command('backup:tidy')->dailyAt('1:00');
 }
Esempio n. 5
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $file = app_path() . '/../posts.out';
     $schedule->command('vk:load_posts')->everyFiveMinutes()->sendOutputTo($file);
     $file = app_path() . '/../review.out';
     $schedule->command('vk:load_reviews')->hourly()->sendOutputTo($file);
 }
Esempio n. 6
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('routine:transfer-data')->everyMinute();
     $schedule->command('routine:send-email')->dailyAt('11:00');
     $schedule->command('routine:send-email')->dailyAt('17:00');
 }
Esempio n. 7
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('delete:jobs')->hourly();
     $schedule->command('truncate:jobs')->dailyAt('23:00');
     $schedule->command('check:OfficielEssai')->dailyAt('23:00');
     $schedule->command('check:generateBillReduction')->dailyAt('23:00');
     $schedule->command('GenarateBills:billsThreeMonths')->dailyAt('23:00');
     $schedule->command('GenerateBills:ThreeMonthsNormal')->dailyAt('23:00');
     $schedule->command('GenerateBills:SixMonths')->dailyAt('23:00');
     $schedule->command('GenerateBills:SixMonthsNormal')->dailyAt('23:00');
     $schedule->command('Manage:years')->daily();
     $schedule->command('nextyear:current')->daily();
     /* $schedule->command('log:demo')->daily()->when(function(){
            if(Carbon::now()->toDateString() == Carbon::now()->startOfMonth()->toDateString())
            {
                return true;
            }
        });*/
     /*$schedule->command('log:demo')->everyMinute()->when(function(){
           if(Carbon::now()->toDateString() == Carbon::now()->toDateString())
           {
               return true;
           }
       });*/
     // $schedule->command('inspire') ->hourly();
     //$schedule->command('log:demo')->monthly();
 }
Esempio n. 8
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');
 }
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     if (env('APP_ENV') != 'local') {
         $schedule->command('rets:properties --function=pull')->dailyAt('13:00')->withoutOverlapping();
         $schedule->command('rets:properties --function=remove')->dailyAt('14:00')->withoutOverlapping();
     }
 }
Esempio n. 10
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('snipeit:inventory-alerts')->daily();
     $schedule->command('snipeit:expiring-alerts')->daily();
     $schedule->command('snipeit:backup')->weekly();
     $schedule->command('backup:clean')->daily();
 }
Esempio n. 11
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     // Backups.
     $schedule->command('backup:run --only-db')->cron('50 * * * * *');
     $schedule->command('backup:clean')->daily()->at('02:30');
     $schedule->command('backup:monitor')->daily()->at('04:30');
 }
Esempio n. 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('dataSourceVancouverIslandWeather')->everyMinute();
     $schedule->command('zoomLevelTuning')->everyMinute();
     $schedule->command('databaseCleaning')->hourly();
 }
Esempio n. 13
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('poller:ping')->everyFiveMinutes();
     $schedule->command('poller:snmp')->everyFiveMinutes();
     $schedule->command('poller:port')->everyFiveMinutes();
     $schedule->command('poller:port --interval=daily --status=A')->daily();
 }
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     /* LIST OF HELPER FUNCTION CAN BE FOUND IN htdocs/laravel/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php */
     /* You need to register single laravel cron on server that runs every minute, checks for any Scheduled command and run them */
     /* Single laravel cron to be registered on server "* * * * * php htdocs/laravel/artisan schedule:run >> /dev/null 2>&1" */
     $schedule->command('laracasts:clear-history')->monthly()->thenPing('url');
     // Scheduling Artisan command, run "php artisan laracasts:clear-history" command every month and ping a specific URL.
     //
     // In order to "emailOutputTo", you should first "sendOutputTo" to save the output to be emailed
     $schedule->command('laracasts:clear-history')->monthly()->sendOutputTo('path/to/file')->emailOutputTo('*****@*****.**');
     // Scheduling Artisan command, run "php artisan laracasts:clear-history" command every month, save output to a specific file and email that output to a specific email.
     $schedule->command('laracasts:clear-history')->monthly()->sendOutputTo('path/to/file');
     // Scheduling Artisan command, run "php artisan laracasts:clear-history" command every month and save output to a specific file
     $schedule->command('laracasts:clear-history')->monthly();
     // Scheduling Artisan command, run "php artisan laracasts:clear-history" command every month
     $schedule->command('laracasts:daily-report')->dailyAt('23:55');
     // Scheduling Artisan command, run "php artisan laracasts:daily-report" command every day at "23:55"
     //$schedule->exec('touch foo.txt')->dailyAt('10:30'); // Scheduling Execution command, create "foo.txt" file every day at "10:30"
     //$schedule->exec('touch foo.txt')->daily(); // Scheduling Execution command, create "foo.txt" file every day
     //$schedule->exec('touch foo.txt')->everyFiveMinutes(); // Scheduling Execution command, create "foo.txt" file every five minutes
     /*
     * $schedule->command('inspire')
             ->hourly(); // Scheduling Artisan command, run "php artisan inspire" every hour
     */
 }
Esempio n. 15
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule $schedule
  *
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     /**
      * Create the schedule based upon what is in the `harvests` table
      */
     try {
         $harvests = Harvest::all();
         foreach ($harvests as $harvest) {
             /**
              * Both ping_before_url and then_ping_url could be NULL
              * in the database but things will fail silently if NULL
              * is passed to pingBefore() or thenPing().
              *
              * This still assumes that if there is a value that it
              * is both valid and GET-able. If either is not a valid
              * URL or that URL does not return a response a silent
              * failure could still occur.
              */
             if ($harvest->ping_before_url !== null && $harvest->then_ping_url !== null) {
                 $schedule->command('harvest:update ' . $harvest->resource . ' --action=' . $harvest->action)->{$harvest->scheduler_frequency_method}()->withoutOverlapping()->pingBefore($harvest->ping_before_url)->thenPing($harvest->then_ping_url);
             } elseif ($harvest->ping_before_url !== null && $harvest->then_ping_url === null) {
                 $schedule->command('harvest:update ' . $harvest->resource . ' --action=' . $harvest->action)->{$harvest->scheduler_frequency_method}()->withoutOverlapping()->pingBefore($harvest->ping_before_url);
             } elseif ($harvest->ping_before_url === null && $harvest->then_ping_url !== null) {
                 $schedule->command('harvest:update ' . $harvest->resource . ' --action=' . $harvest->action)->{$harvest->scheduler_frequency_method}()->withoutOverlapping()->thenPing($harvest->then_ping_url);
             } else {
                 // Both are null
                 $schedule->command('harvest:update ' . $harvest->resource . ' --action=' . $harvest->action)->{$harvest->scheduler_frequency_method}()->withoutOverlapping();
             }
         }
     } catch (\Exception $e) {
         // Hopefully we are only here because we are migrating,
         // which does not like the database query above.
     }
 }
Esempio n. 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');
 }
Esempio n. 17
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule $schedule
  * @return void
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('deployer:heartbeats')->everyFiveMinutes()->withoutOverlapping();
     $schedule->command('deployer:checkurls')->everyFiveMinutes()->withoutOverlapping();
     $schedule->command('deployer:purge-avatars')->weekly()->sundays()->at('00:30')->withoutOverlapping();
     $schedule->command('deployer:purge-temp')->hourly()->withoutOverlapping();
 }
Esempio n. 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->command('ltd:sendscheduled')->everyFiveMinutes();
     $schedule->command('ltd:notifynotetaker')->dailyAt('05:00');
     $schedule->command('ltd:notifypaused')->dailyAt('05:00');
 }
Esempio n. 19
0
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('checkforitems')->daily();
     $schedule->command("scrapehtml")->everyThirtyMinutes();
     $schedule->command("saveboosteraverage")->dailyAt('16:00');
     $schedule->command("scrapegraph")->everyTenMinutes();
 }
Esempio n. 20
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');
 }
Esempio n. 21
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('passwordReset:cron')->cron('*/2 * * * * *')->sendOutputTo(storage_path('logs/cronPasswordReset.log'));
     $schedule->command('smsReset:cron')->daily()->sendOutputTo(storage_path('logs/cronsmsReset.log'));
     $schedule->command('spams:reset')->cron('*/1 * * * * *')->sendOutputTo(storage_path('logs/spam.log'));
 }
Esempio n. 22
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);
 }
Esempio n. 23
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();
 }
 /**
  * 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();
 }
Esempio n. 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();
     $schedule->command('sync:caldav --background')->withoutOverlapping()->everyTenMinutes();
     $schedule->command('optimise:meetings --background')->withoutOverlapping()->weekly()->sundays()->at('00:00');
 }
Esempio n. 26
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)){
 }
Esempio n. 27
0
 /**
  * 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');
 }
Esempio n. 28
0
 /**
  * Define the application's command schedule.
  *
  * @param \Illuminate\Console\Scheduling\Schedule $schedule        	
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     //$schedule->command ( 'inspire' )->hourly ();
     //@todo solo cambio para pruebas debe de quedarse en hourly()
     $schedule->command('larus:salesRead')->cron('*/1 * * * *');
     //@todo solo cambio para pruebas debe de quedarse en cada 2 horas()
     $schedule->command('larus:salesRead')->cron('*/30 * * * *');
 }
Esempio n. 29
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('orders:processed')->hourly();
     $schedule->command('orders:travel')->dailyAt('18:30');
     $schedule->command('orders:deliver')->dailyAt('19:00');
 }
Esempio n. 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('positions:load')->everyMinute()->appendOutputTo('scheduler.log');
     $schedule->command('dashboard:update')->hourly();
     $schedule->command('xml:delete')->daily();
     $schedule->command('commands:response')->everyMinute();
 }