| Current Path : /var/app/current/fukushisurvey.jp/quill/routes/ |
| Current File : /var/app/current/fukushisurvey.jp/quill/routes/console.php |
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Schedule;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote')->hourly();
// when expired change the status of survey
Schedule::command('change:surveystatus')->timezone('Asia/Tokyo')->dailyAt('23:59')
->after(function () {
Log::info('schedule run and survey status has changed');
});
// empty pdf generated while exporting once in a week
Schedule::command('remove:pdfs')->timezone('Asia/Tokyo')->weekly()->saturdays()->at('2:00');
// notify when survey start date is reached
Schedule::command('app:survey-startdate-reached')->timezone('Asia/Tokyo')->dailyAt('00:01')
->after(function () {
Log::info('schedule run and survey start date has reached');
});
// notify when 3 days left to end the survey
Schedule::command('app:days-left-to-end')->timezone('Asia/Tokyo')->dailyAt('00:01')
->after(function () {
Log::info('schedule run and notify 3 days left to end survey');
});
// Generate monthly invoices based on monthly surveys on the first day of every month at 00:01 AM
Schedule::command('generate:monthly-invoices')->timezone('Asia/Tokyo')->monthlyOn(1, '00:01');
// Generate yearly invoices by checking subscription daily at 00:05 AM
Schedule::command('generate:yearly-invoices')->timezone('Asia/Tokyo')->dailyAt('00:05');
//Send unpaid invoice reminders on the first day of each month at 7:00 AM
Schedule::command('send:unpaid-invoice-reminders-monthly')->timezone('Asia/Tokyo')->monthlyOn(1, '7:00');
// Send one-time unpaid invoice reminders for non-monthly subscriptions daily at 7:00 AM
Schedule::command('send:one-time-unpaid-invoice-reminders-yearly')->timezone('Asia/Tokyo')->dailyAt('7:00');
// Notify the survey admin(notification_email) when survey is submitted by the user
Schedule::command('app:notify-survey-responded')->timezone('Asia/Tokyo')->dailyAt('08:00');
// Auto renew yearly plans for users whose subscription end date is today
Schedule::command('plan:renewal')->timezone('Asia/Tokyo')->dailyAt('23:30');
// Send renewal reminder emails to users 7, 30, and 60 days before their subscription ends
Schedule::command('plan:renewal-reminder')->timezone('Asia/Tokyo')->dailyAt('00:05');