Problem
WordPress’ cron doesn’t work when a site has basic authentication. You basically would get a 401 error.
Solution
Thanks to Nick Ohrn (in 2014) this problem is solved with a simple mu-plugin. You just need to set the username and password in a constant in wp-config and add some code to the mu-plugins directory. Here is his quick tip.