diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index f4f6a4a737..7d4ac70091 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -64,11 +64,10 @@ class ScheduleExecutions extends ScheduleBase \go(function () use ($queueForFunctions, $schedule, $scheduledAt, $delay, $data, $dbForPlatform) { Co::sleep($delay); - // Calculate actual delay and execution time for late executions $executedAt = new \DateTime(); $actualDelay = $executedAt->getTimestamp() - $scheduledAt->getTimestamp(); - // Prepare headers to inform about late execution + // Add headers for delayed executions $headers = $data['headers'] ?? []; if ($actualDelay > 0) { $headers['x-appwrite-schedule-delay'] = (string)$actualDelay;