Kernel.php
5.64 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
namespace App\Console;
use App\Console\Commands\AdExtensionsAdd;
use App\Console\Commands\AdExtensionsLoad;
use App\Console\Commands\AdGroupsAdd;
use App\Console\Commands\AdGroupsLoadUpdated;
use App\Console\Commands\AdGroupsUpdate;
use App\Console\Commands\AdImagesAdd;
use App\Console\Commands\AdImagesLoad;
use App\Console\Commands\AdvertisementsAdd;
use App\Console\Commands\AdvertisementsLoadUpdated;
use App\Console\Commands\AdvertisementsUpdate;
use App\Console\Commands\AudienceTargetsAdd;
use App\Console\Commands\BidModifiersAdd;
use App\Console\Commands\BidModifiersDelete;
use App\Console\Commands\BidModifiersUpdate;
use App\Console\Commands\CampaignsAdd;
use App\Console\Commands\CampaignsCheckChange;
use App\Console\Commands\CampaignsCheckUpdatedChildren;
use App\Console\Commands\CampaignsLoadBidModifiers;
use App\Console\Commands\CampaignsLoadGroups;
use App\Console\Commands\AdGroupsLoadKeywords;
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\DictionaryCampaignsSyncByCampaign;
use App\Console\Commands\KeywordsAdd;
use App\Console\Commands\KeywordsDelete;
use App\Console\Commands\KeywordsUpdate;
use App\Console\Commands\NegativeKeywordSharedSetsAdd;
use App\Console\Commands\NegativeKeywordSharedSetsLoad;
use App\Console\Commands\NegativeKeywordSharedSetsUpdate;
use App\Console\Commands\RefreshLimits;
use App\Console\Commands\RetargetinglistsAdd;
use App\Console\Commands\RetargetinglistsLoad;
use App\Console\Commands\RetargetinglistsUpdate;
use App\Console\Commands\SitelinksAdd;
use App\Console\Commands\SitelinksLoad;
use App\Console\Commands\VCardsAdd;
use App\Console\Commands\VCardsLoad;
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(DictionaryCampaignsSyncByCampaign::class)->everyThirtyMinutes();
$schedule->command(RefreshLimits::class)->hourly();
$schedule->command(DictionariesLoad::class)->saturdays()->at('05:00');
$schedule->command(CampaignsCheckChange::class)->hourlyAt(5);
$schedule->command(CampaignsLoadUpdated::class)->hourlyAt(10);
$schedule->command(CampaignsCheckUpdatedChildren::class)->hourlyAt(10);
$schedule->command(RetargetinglistsLoad::class)->hourlyAt(5);
$schedule->command(RetargetinglistsUpdate::class)->hourlyAt(10);
$schedule->command(NegativeKeywordSharedSetsLoad::class)->hourlyAt(10);
$schedule->command(AdImagesLoad::class)->hourlyAt(10);
$schedule->command(CampaignsAdd::class)->hourlyAt(15);
$schedule->command(CampaignsUpdate::class)->hourlyAt(15);
$schedule->command(CampaignsResume::class)->hourlyAt(15);
$schedule->command(CampaignsSuspend::class)->hourlyAt(15);
$schedule->command(CampaignsLoadBidModifiers::class)->hourlyAt(20);
$schedule->command(CampaignsLoadGroups::class)->hourlyAt(20);
$schedule->command(AdGroupsLoadUpdated::class)->hourlyAt(20);
$schedule->command(AdvertisementsLoadUpdated::class)->hourlyAt(20);
$schedule->command(AdGroupsLoadKeywords::class)->hourlyAt(30);
$schedule->command(AdExtensionsLoad::class)->hourlyAt(25);
$schedule->command(SitelinksLoad::class)->hourlyAt(25);
$schedule->command(VCardsLoad::class)->hourlyAt(25);
$schedule->command(VCardsAdd::class)->hourlyAt(35);
$schedule->command(AdImagesAdd::class)->hourlyAt(35);
$schedule->command(AdExtensionsAdd::class)->hourlyAt(35);
$schedule->command(SitelinksAdd::class)->hourlyAt(35);
$schedule->command(NegativeKeywordSharedSetsAdd::class)->hourlyAt(35);
$schedule->command(NegativeKeywordSharedSetsUpdate::class)->hourlyAt(35);
$schedule->command(RetargetinglistsAdd::class)->hourlyAt(35);
$schedule->command(AdGroupsAdd::class)->hourlyAt(35);
$schedule->command(AdGroupsUpdate::class)->hourlyAt(35);
$schedule->command(RetargetinglistsAdd::class)->hourlyAt(40);
$schedule->command(AudienceTargetsAdd::class)->hourlyAt(45);
$schedule->command(BidModifiersDelete::class)->hourlyAt(30);
$schedule->command(BidModifiersAdd::class)->hourlyAt(35);
$schedule->command(BidModifiersUpdate::class)->hourlyAt(35);
$schedule->command(KeywordsAdd::class)->hourlyAt(40);
$schedule->command(KeywordsUpdate::class)->hourlyAt(40);
$schedule->command(KeywordsDelete::class)->hourlyAt(40);
$schedule->command(AdvertisementsAdd::class)->hourlyAt(50);
$schedule->command(AdvertisementsUpdate::class)->hourlyAt(50);
$schedule->call(function () {
$items = new \FilesystemIterator(config('clockwork.storage_files_path'));
foreach ($items as $item) {
if ($item->getFilename() !== '.gitignore') {
echo @unlink($item->getPathname()) . PHP_EOL;
}
}
})->saturdays()->at('00:00');
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}