From 2de66cdbd44eea1d5015ebb5dc576517242e1b97 Mon Sep 17 00:00:00 2001 From: "Beau Beauchamp, WebTigers" Date: Sat, 3 Oct 2026 09:07:29 -0400 Subject: [PATCH] =?UTF-8?q?schedule:=20fix=20cronCommand()=20=E2=80=94=20c?= =?UTF-8?q?d=20into=20app=20root=20so=20the=20pasted=20cron=20line=20works?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bin/tiger resolves the app root from the working directory, so the displayed cron line failed with "run this from a Tiger app root" when pasted as-is. Prefix it with `cd &&`. The two schedule tests (string type; contains "schedule:run") still pass. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ --- modules/schedule/services/Schedule.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/schedule/services/Schedule.php b/modules/schedule/services/Schedule.php index 10afd86d..3bdfd5f8 100644 --- a/modules/schedule/services/Schedule.php +++ b/modules/schedule/services/Schedule.php @@ -115,6 +115,8 @@ public function runNow(array $params): void public static function cronCommand() { $root = defined('APPLICATION_ROOT') ? APPLICATION_ROOT : (defined('APPLICATION_PATH') ? dirname(APPLICATION_PATH) : '/path/to/app'); - return 'php ' . $root . '/vendor/bin/tiger schedule:run >/dev/null 2>&1'; + // `bin/tiger` resolves the app root from the WORKING DIRECTORY, so the command must cd there first; + // without it a pasted line fails with "run this from a Tiger app root". + return 'cd ' . $root . ' && php vendor/bin/tiger schedule:run >/dev/null 2>&1'; } }