wp_schedule_event function reference

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

Leave a Reply

Your email address will not be published. Required fields are marked *