improve claim settle

This commit is contained in:
xiaomlove
2022-05-06 15:50:26 +08:00
parent c23cc1b441
commit f64834b594
18 changed files with 124 additions and 69 deletions
-1
View File
@@ -3,7 +3,6 @@
namespace App\Console\Commands;
use App\Repositories\ClaimRepository;
use App\Repositories\ExamRepository;
use Illuminate\Console\Command;
class ClaimSettle extends Command
+1 -1
View File
@@ -127,7 +127,7 @@ class Test extends Command
// $r = $rep->getContinuousPoints(11);
$arr = [1,2];
$r = collect($arr)->map(fn($item) => $item * 2)->implode(',');
$r = Carbon::now()->format('d');
dd($r, $arr);
}
+9 -7
View File
@@ -2,6 +2,7 @@
namespace App\Console;
use Carbon\Carbon;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@@ -24,14 +25,15 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('exam:assign_cronjob')->everyMinute();
$schedule->command('exam:checkout_cronjob')->everyMinute();
$schedule->command('exam:update_progress --bulk=1')->hourly();
$schedule->command('backup:cronjob')->everyMinute();
$schedule->command('hr:update_status')->everyMinute();
$schedule->command('hr:update_status --ignore_time=1')->hourly();
$schedule->command('exam:assign_cronjob')->everyMinute()->withoutOverlapping();
$schedule->command('exam:checkout_cronjob')->everyMinute()->withoutOverlapping();
$schedule->command('exam:update_progress --bulk=1')->hourly()->withoutOverlapping();
$schedule->command('backup:cronjob')->everyMinute()->withoutOverlapping();
$schedule->command('hr:update_status')->everyMinute()->withoutOverlapping();
$schedule->command('hr:update_status --ignore_time=1')->hourly()->withoutOverlapping();
$schedule->command('user:delete_expired_token')->dailyAt('04:00');
$schedule->command('claim:settle')->monthlyOn();
$schedule->command('claim:settle')->hourly()->between("00:00", "12:00")
->when(function () {Carbon::now()->format('d') == '01';})->withoutOverlapping();
}
/**