Hello I have to run cron
which I have written in core php
. Path of my php file in
/var/www/html/xplore/crons/examples/example.php
when I go to path of mu file and run script using php example.php it give me proper output. But How to give path of file in crontab
I have tried it by using
*/2 * * * * root usr/bin/php xplore/crons/examples/example.php
Do you have any idea please help me in to that?
try like below,
*/2 * * * * /usr/bin/php -q /xplore/crons/examples/example.php
*/2 * * * * It means that cron will run in every 2 min.
Seems like the file path that you are passing is wrong. You can try this
*/2 * * * * root /usr/bin/php /xplore/crons/examples/example.php
if this path(xplore/crons/examples/example.php) is correct