I am stuck from quite a few days,
I need few good ways to call phing task from cron job.
The actual issue is after calling phing task from cron, the php engine cannot locate the build.xml file, which is located to the main directory of my project
build.xml path : abc/build.xml
phing path : abc/vendor/bin/phing
my cron : 1 * * * * xyz/local/www/abc/vendor/bin/phing test
Two possible solutions.
First one, you can use
cdin your cron:Second solution, use the
-foption:If you have problems with relative paths inside your buildfile you should also set the
basedirattribute in the<project>tag:Sources:
https://superuser.com/questions/155576/linux-how-to-run-a-command-in-a-given-directory
https://www.phing.info/phing/guide/en/output/chunkhtml/ch02s03.html
https://www.phing.info/phing/guide/en/output/chunkhtml/ch03s05.html