MCPcopy Create free account
hub / github.com/Rello/analytics / run

Method run

lib/BackgroundJob/StartOfDay.php:33–47  ·  view source on GitHub ↗
($arguments)

Source from the content-addressed store, hash-verified

31 }
32
33 public function run($arguments)
34 {
35 $currentTime = new \DateTime(); // Current time
36 $startOfDay = new \DateTime('today 00:00:00'); // Start of the day
37 $endOfFirst15Minutes = (clone $startOfDay)->modify('+15 minutes'); // End of first 15 minutes of the day
38
39 if ($currentTime >= $startOfDay && $currentTime <= $endOfFirst15Minutes) {
40 try {
41 $this->logger->debug('Analytics Dataload - Start of day');
42 $this->DataloadService->executeBySchedule('s');
43 } catch (\Exception $e) {
44 // Handle exception or log error
45 }
46 }
47 }
48
49}

Callers

nothing calls this directly

Calls 2

executeByScheduleMethod · 0.80
debugMethod · 0.45

Tested by

no test coverage detected