Plugin has a cron job, but the function doesn’t actually run

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' );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)