You have got it wrong. The function wp_schedule_event()
schedules a action hook with the third argument. So you will need to call your function on the scheduled hook. Like this –
add_action( 'archive_data', 'archive_data' );
You have got it wrong. The function wp_schedule_event()
schedules a action hook with the third argument. So you will need to call your function on the scheduled hook. Like this –
add_action( 'archive_data', 'archive_data' );