mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Console;
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
class Kernel extends ConsoleKernel
|
|
{
|
|
/**
|
|
* Define the application's command schedule.
|
|
*
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
* @return void
|
|
*/
|
|
protected function schedule(Schedule $schedule)
|
|
{
|
|
if (env('APP_ENV') === 'stage' && env('LXC') === '1') {
|
|
$schedule->command('intranet:sync-vacations')->twiceDaily();
|
|
//$schedule->command('karat:sync-users')->daily();
|
|
$schedule->command('karat:sync-clients')->daily();
|
|
$schedule->command('karat:sync-projects')->daily();
|
|
$schedule->command('karat:sync-timesheets')->daily();
|
|
}
|
|
|
|
if (env('APP_ENV') === 'prod' && env('LXC') === '1') {
|
|
$schedule->command('intranet:sync-vacations')->twiceDaily();
|
|
$schedule->command('karat:sync-users')->daily();
|
|
$schedule->command('karat:sync-clients')->hourly();
|
|
$schedule->command('karat:sync-projects')->everyFiveMinutes();
|
|
$schedule->command('karat:sync-timesheets')->everyFiveMinutes();
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands()
|
|
{
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|