Crons
This commit is contained in:
parent
c5dfc53b82
commit
fce186a8e2
2 changed files with 12 additions and 3 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Console\Commands\CalculateSpace;
|
||||
use App\Console\Commands\CalculateTraffic;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
|
@ -13,7 +15,8 @@ class Kernel extends ConsoleKernel
|
|||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
CalculateSpace::class,
|
||||
CalculateTraffic::class
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -24,7 +27,8 @@ class Kernel extends ConsoleKernel
|
|||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
// $schedule->command('inspire')->hourly();
|
||||
$schedule->command('calculate:space')->hourlyAt(10)->withoutOverlapping();
|
||||
$schedule->command('calculate:traffic')->hourlyAt(10)->withoutOverlapping();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,10 +54,11 @@ Setup env
|
|||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name kuvia.cloud www.kuvia.cloud www1.kuvia.cloud www1.kuvia.cloud www2.kuvia.cloud www3.kuvia.cloud www4.kuvia.cloud www5.kuvia.cloud www6.kuvia.cloud www7.kuvia.cloud www8.kuvia.cloud www9.kuvia.cloud;
|
||||
server_name kuvia.cloud www.kuvia.cloud;
|
||||
root /var/www/kuvia/public;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
client_max_body_size 100M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
@ -81,3 +82,7 @@ run
|
|||
ln -s /etc/nginx/sites-available/kuvia /etc/nginx/sites-enabled/
|
||||
systemctl restart nginx
|
||||
```
|
||||
|
||||
# Setup php
|
||||
|
||||
set upload_max_filesize and post_max_size to 100M in php.ini
|
||||
|
|
Loading…
Reference in a new issue