Fix: Job to check invoice due dates was never run

Made it a command so it runs with the scheduler
This commit is contained in:
2026-03-05 10:42:40 +01:00
parent 4ee1d01e38
commit c470240dc0
8 changed files with 82 additions and 63 deletions
+4 -3
View File
@@ -14,7 +14,7 @@ class CaldavSyncCommand extends Command
protected $signature = 'caldav:sync';
protected $description = 'Sync CalDAV VTODOs into local todos table';
public function handle(CaldavService $service)
public function handle(CaldavService $service)
{
// only run every 5 minutes although the task is called every minute
$cacheKey = 'caldav_sync_last_run';
@@ -24,8 +24,8 @@ public function handle(CaldavService $service)
}
Cache::put($cacheKey, true, 300);
Log::info('Running CalDAV sync');
$this->info('Starting CalDAV sync');
Log::info('Synchronizing Todo itmes with CalDAV server');
$this->info('Synchronizing Todo itmes with CalDAV server');
$todos = $service->getTodos();
@@ -106,6 +106,7 @@ public function handle(CaldavService $service)
Log::info("Synced " . count($todos) . " todos.");
$this->info("Synced " . count($todos) . " todos.");
return 0;
}
}