drupflare/worker - v1.0.4
    Preparing search index...

    Variable RUN_CRON_HOOK_PHPConst

    RUN_CRON_HOOK_PHP: "\nuse Drupal\\Core\\Session\\AnonymousUserSession;\n\n// __CFW_FIBER_SHIM__\nchdir('/drupal');\n\n$module = json_decode(__CFW_MODULE__);\n$out = ['module' => $module, 'ran' => false];\n$clock = function () {\n\treturn microtime(true) * 1000;\n};\n$t0 = $clock();\n\ntry {\n\t// __CFW_KERNEL_BOOT__\n\t// __CFW_COLLECT_CRON_LISTENERS__\n\n\tif (!isset($found[$module])) {\n\t\t$out['reason'] = 'no cron implementation';\n\t} elseif (count($found[$module]) > 1) {\n\t\t// core's own invariant; ModuleHandler::invoke() raises LogicException here\n\t\t$out['reason'] = 'more than one implementation';\n\t\t$out['count'] = count($found[$module]);\n\t} else {\n\t\t$switcher = null;\n\t\ttry {\n\t\t\t$switcher = Drupal::service('account_switcher');\n\t\t\t$switcher->switchTo(new AnonymousUserSession());\n\t\t} catch (Throwable $e) {\n\t\t\t$out['switchError'] = $e->getMessage();\n\t\t\t$switcher = null;\n\t\t}\n\t\t$fn = $found[$module][0];\n\t\t$a = $clock();\n\t\ttry {\n\t\t\tcall_user_func($fn);\n\t\t\t$out['ran'] = true;\n\t\t} catch (Throwable $e) {\n\t\t\t$out['error'] = get_class($e) . ': ' . $e->getMessage();\n\t\t\t$out['trace'] = substr($e->getTraceAsString(), 0, 800);\n\t\t}\n\t\t$out['hookMs'] = round($clock() - $a, 2);\n\t\tif ($switcher !== null) {\n\t\t\ttry {\n\t\t\t\t$switcher->switchBack();\n\t\t\t} catch (Throwable $e) {\n\t\t\t}\n\t\t}\n\t}\n} catch (Throwable $e) {\n\t$out['error'] = get_class($e) . ': ' . $e->getMessage();\n}\n\n$out['ms'] = round($clock() - $t0, 2);\necho json_encode($out);\n"