Kernel.php
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
namespace App\Console;
use App\Console\Commands\AdGroupsAdd;
use App\Console\Commands\AdGroupsLoadUpdated;
use App\Console\Commands\AdGroupsUpdate;
use App\Console\Commands\CampaignsAdd;
use App\Console\Commands\CampaignsCheckChange;
use App\Console\Commands\CampaignsCheckUpdatedChildrenAdGroups;
use App\Console\Commands\CampaignsLoadGroups;
use App\Console\Commands\CampaignsResume;
use App\Console\Commands\CampaignsSuspend;
use App\Console\Commands\CampaignsUpdate;
use App\Console\Commands\DictionariesLoad;
use App\Console\Commands\CampaignsLoadUpdated;
use App\Console\Commands\RefreshLimits;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command(RefreshLimits::class)->hourly();
$schedule->command(DictionariesLoad::class)->saturdays()->at('05:00');
$schedule->command(CampaignsCheckChange::class)->hourlyAt(5);
$schedule->command(CampaignsCheckUpdatedChildrenAdGroups::class)->hourlyAt(10);
$schedule->command(CampaignsLoadUpdated::class)->hourlyAt(10);
$schedule->command(CampaignsAdd::class)->hourlyAt(20);
$schedule->command(CampaignsUpdate::class)->hourlyAt(20);
$schedule->command(CampaignsResume::class)->hourlyAt(20);
$schedule->command(CampaignsSuspend::class)->hourlyAt(20);
$schedule->command(AdGroupsLoadUpdated::class)->hourlyAt(20);
// $schedule->command(CampaignsLoadGroups::class)->hourlyAt(40);
$schedule->command(AdGroupsAdd::class)->hourlyAt(30);
$schedule->command(AdGroupsUpdate::class)->hourlyAt(30);
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}