I working on the wp_schedule_event recursive function. In the function, I have create a email message and it works. this function fires every 1 hour.

function do_this_hourly() {

$to = 'one@domain.com';

$subject = 'Test my one hour job';

$message = 'you received this message ';

mail( $to, $subject, $message, 'From: no-reply@domain.com' . "rn" );

}

but now, I have this external php page which needs to be refresh/load/reload every one hour without anyone loading it on the browser

$link = “http://www.example.com/path/to/link/

header(‘Location: ‘ . $link);

Does anyone knows how to do it?

Read more here: wp_schedule_event function reference


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: