I need to run a specific url on my domain

http://domain.com/?action=update_feed

, so I made a cron-file.php file, which contains the below code:

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

In Cpanel's cron manager, i added this to run each minute:

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

However, nothing is happening. I also tried using wget instead of php but get the same results.

有帮助吗?

解决方案

You can directly access you site without cron-file.php

    wget -qO /dev/null 'http://domain.com/?action=update_feed'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top