WordPress, how to run a function every 12 december?

Unfortunately, you cannot run script on every 12 December. WP Cron can be only defined as interval from first execution of script, so you have to execute script on 12 December with one year interval to do exactly what you want.

I will suggest you to create WP Cron job with daily interval and check in script if today is 12 December.

if (!wp_next_scheduled('my_task_hook')) {
    wp_schedule_event(time(), 'daily', 'my_task_hook');
}

add_action('my_task_hook', 'my_task_function');

function my_task_function() {
    $today = strtotime(date());
    if (date('d', $today) == '12' && date('m', $today) == '12') {
        // today is 12 December!
    }
}

error code: 523