Cpanel Cron作业未执行.php文件中的代码

Cpanel Cron作业未执行.php文件中的代码,php,cron,cpanel,Php,Cron,Cpanel,我需要在我的域上运行一个特定的url ,因此我创建了一个cron-file.php文件,其中包含以下代码: <?php header("Location: http://domain.com/?action=update_feed"); /* Redirect browser */ exit; ?> 在Cpanel的cron管理器中,我添加了以下内容以每分钟运行一次: php-q/home/public_html/domain/wp content/themes/theme/

我需要在我的域上运行一个特定的url

,因此我创建了一个cron-file.php文件,其中包含以下代码:

<?php
header("Location: http://domain.com/?action=update_feed"); /* Redirect browser */
exit;
?>

在Cpanel的cron管理器中,我添加了以下内容以每分钟运行一次:

php-q/home/public_html/domain/wp content/themes/theme/cron-file.php

    wget -qO /dev/null 'http://domain.com/?action=update_feed'

然而,什么也没有发生。我还尝试使用wget代替php,但得到了相同的结果。

您可以直接访问您的站点,而无需cron-file.php

    wget -qO /dev/null 'http://domain.com/?action=update_feed'