Might be a bad question but im unable to solve it right now.
My WP_cron executes on the starting point but doesn't seem to perform afterwards.
My functions.php
code is:
add_action( 'my_scheduled_event', 'prefix_my_scheduled_event' );
if(!wp_next_scheduled('my_scheduled_event')){
$timestamp = strtotime( '2017-09-28 12:05:00' );
$recurrence = 'twicedaily';
$hook = 'my_scheduled_event';
wp_schedule_event( $timestamp, $recurrence, $hook );
}
Additionaly i have added this line to wp-config.php
to make it work in the first place.
define('ALTERNATE_WP_CRON', true);
Any suggestions are welcome.
wp_cron
doesn't operate exactly likecron
on a server. It only gets triggered if and when someone visits the website. Is it possible that it wasn't triggered because there were no visits?