Skip to content

Commit 5c2c709

Browse files
authored
Update cron.md
1 parent 9da467e commit 5c2c709

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/sections/cron.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ Also don't forget to set Configure key `'Queue.maxworkers'` to a reasonable valu
1818
If, for any reason, some of the jobs should take way longer, you want to avoid additional x workers to be started.
1919
It will then just not start new ones beyond this count until the already running ones are finished.
2020
This is an important server protection to avoid overloading.
21+
22+
## Specific PHP version
23+
24+
If you have multiple PHP versions running on your server, using the above setup can yield to the default CLI one being used which can be different from the expected one.
25+
You want to select and run the same version as your non-CLI env (nginx/php-fpm).
26+
27+
To ensure this, specify it by replacing `bin/cake` with `/usr/bin/php8.{n} bin/cake.php`, e.g.:
28+
```
29+
0 * * * * cd /full/path/to/app && /usr/bin/php8.4 bin/cake.php queue run -q
30+
```

0 commit comments

Comments
 (0)