diff --git a/src/Appwrite/Platform/Tasks/schedule.php b/src/Appwrite/Platform/Tasks/schedule.php index 0d88de1d05..ca1de4164e 100644 --- a/src/Appwrite/Platform/Tasks/schedule.php +++ b/src/Appwrite/Platform/Tasks/schedule.php @@ -12,6 +12,8 @@ use Utopia\Database\Query; use Swoole\Timer; use Utopia\Database\Database; +use function Swoole\Coroutine\run; + class Schedule extends Action { const FUNCTION_UPDATE_TIMER = 10; //seconds @@ -96,7 +98,7 @@ class Schedule extends Action Console::success("Starting timers at " . DateTime::now()); - Co\run( + run( function () use ($dbForConsole, &$schedules, &$lastSyncUpdate, $getSchedule) { /** * The timer synchronize $schedules copy with database collection.