0

I have written a cron job in my Server as below

35 * * * * /home/sites/domain.com/public_html/admin/filename.php

I am trying to call a file in http://domain.com/admin/filename.php.

In Cron job i navigated to every folder by the way its stored in directory in server.But the way to reach the same file in browser is as below

http://domain.com/admin/filename.php

Now the cron filename.php is not running.I checked the file permission every thing is perfect.

I want to know is there a problem in the path i specified

Thanks in advance

4

1 回答 1

0

当您在 cron 中运行 php 文件时。您必须配置为:

35 * * * * /usr/bin/php /home/sites/domain.com/public_html/admin/filename.php

并且您想在服务器中运行守护程序。您可以设置为:

nohup php /home/sites/domain.com/public_html/admin/filename.php &
于 2017-01-16T03:30:17.433 回答