this is my code
function myprefix_custom_cron_schedule( $schedules ) {
$schedules['every_day'] = array(
'interval' => 86400, // Every 24 hours
'display' => __( 'Every 24 hours' ),
);
return $schedules;
}
add_filter( 'cron_schedules', 'myprefix_custom_cron_schedule' );
//Schedule an action if it's not already scheduled
if ( ! wp_next_scheduled( 'myprefix_cron_hook' )) {
wp_schedule_event( time(), 'every_day', 'myprefix_cron_hook' );
}
///Hook into that action that'll fire every 24 hours
add_action( 'myprefix_cron_hook', 'get_products_url' );
the codes above fires an event every 86400 seconds(24hr), but from first time it was fired...
I want my event fires every night at 23:00
How can I set the specific time for firing the event?
Please help me...
thanks