This is a bit of a mystery to me since you have to "be in" the folder of the Cakefile to run the cake command. I don't really know where cake its path from, but I've tried running this
cd /
PWD=/path/to/cake/file cake server
Still getting this error:
Error: Cakefile not found in /
Would something like
cd /path/to/cake/file && cake server
Work in a cron file? Also could that pose a problem for the remaining cron jobs?
You can use ()
to make a subshell to run your command without affecting the rest:
(cd /path/to/cake/file && cake server)