Cronjob function not executed – negative seconds

I’ve managed to fix it!

The problem was calling the wrong add_action.

I had:

// Schedule Cron Job Event
function custom_cron_job() {
    if ( ! wp_next_scheduled( 'XML_import' ) ) {
        wp_schedule_event( time(), 'hourly', 'XML_import' );
    }
}
add_action( 'wp', 'custom_cron_job' );

But it must be:

// Schedule Cron Job Event
if (! wp_next_scheduled( 'xml' ) ) {
    wp_schedule_event( time(), 'hourly', 'xml' );
}

add_action( 'xml', 'XML_import' );