Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/schedule/services/Schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
Loading