Kernel.php 1.85 KB
<?php namespace App\Console;

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 = [
		'App\Console\Commands\KstychDaily',
		'App\Console\Commands\KstychPAMI',
		'App\Console\Commands\KstychPAGI',
		'App\Console\Commands\DailyLogout',
		'App\Console\Commands\InsertCrmArchive',
		'App\Console\Commands\InsertCrmArchive2',
		'App\Console\Commands\DeleteCrmcalls',
		'App\Console\Commands\DeleteCRMCallArchive',
		'App\Console\Commands\DeleteCrmcalls',
		'App\Console\Commands\ClearDiallines',
		'App\Console\Commands\HangupCall',
		'App\Console\Commands\CreateCall',
		'App\Console\Commands\PredictiveCallHangUp',
		'App\Console\Commands\UpdateAvgRingSec',
	];

	/**
	 * Define the application's command schedule.
	 *
	 * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
	 * @return void
	 */
	protected function schedule(Schedule $schedule)
	{
		$schedule->command('KstychDaily')->daily()->withoutOverlapping()->runInBackground();

		$schedule->command('InsertCrmArchive')->everyFiveMinutes()->appendOutputTo(storage_path() . "/reason/kstych.txt")->withoutOverlapping()->runInBackground();
		//$schedule->command('InsertCrmArchive2')->monthlyOn(1,'14:30')->withoutOverlapping();

		$schedule->command('DeleteCrmcalls')->dailyAt('02:30')->withoutOverlapping()->runInBackground();
		//$schedule->command('DeleteCRMCallArchive')->monthlyOn(1,'14:30')->withoutOverlapping();


		// added cron for do diallines free by YASHWANT on 29062017
		$schedule->command('ClearDiallines')->everyMinute()->withoutOverlapping()->runInBackground(); // ->appendOutputTo(storage_path()."/output.txt");

		$schedule->command('HangupCall')->everyTenMinutes()->withoutOverlapping()->runInBackground();
	}
}