本文整理汇总了PHP中Illuminate\Console\Scheduling\Schedule类的典型用法代码示例。如果您正苦于以下问题:PHP Schedule类的具体用法?PHP Schedule怎么用?PHP Schedule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Schedule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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('[email protected]')->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
示例16: 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('sync:caldav --background')->withoutOverlapping()->everyTenMinutes();
$schedule->command('optimise:meetings --background')->withoutOverlapping()->weekly()->sundays()->at('00:00');
}
开发者ID:dsd-meetme,项目名称:backend,代码行数:13,代码来源:Kernel.php
示例17: 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 () {
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();
}
开发者ID:Zlob,项目名称:SkillCompass,代码行数:31,代码来源:Kernel.php
示例18: schedule
/**
* 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();
}
开发者ID:atrauzzi,项目名称:laravel-drydock,代码行数:13,代码来源:Kernel.php
示例19: schedule
/**
* 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('* * * * *');
}
开发者ID:roslairy,项目名称:nofetch,代码行数:13,代码来源:Kernel.php
示例20: schedule
/**
* 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();
}
开发者ID:thomasdola,项目名称:afrouteWeb,代码行数:13,代码来源:Kernel.php
注:本文中的Illuminate\Console\Scheduling\Schedule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论