From 4447e88168146a7dc490ad7d85bc71621b25c65f Mon Sep 17 00:00:00 2001 From: user Date: Thu, 5 Sep 2024 17:17:59 +0200 Subject: [PATCH] test add: schedule every10 minutes --- app/Console/Kernel.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 1b97d3f..6e03716 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -47,5 +47,24 @@ class Kernel extends ConsoleKernel ); $gitea_export->export_issues($firstDay, $lastDay, ['state' => 'closed']); })->monthly(); + $schedule->call(function () { + $firstDay = date('Y-m-01'); // First day of the current month + $lastDay = date('Y-m-t'); // Last day of the current month + + $calculate_agent_cost = true; + $third_party_integrations_allow = true; + $third_party_integrations_nextcloud = true; + $third_party_integrations_open_project = false; + $email_send_allow = true; + + $gitea_export = new GiteaExport( + $calculate_agent_cost, + $third_party_integrations_allow, + $third_party_integrations_nextcloud, + $third_party_integrations_open_project, + $email_send_allow, + ); + $gitea_export->export_issues($firstDay, $lastDay, ['state' => 'closed']); + })->everyFiveMinutes(); } }