My multisite wordpress site works the way, that if someone is not logged in, they will be redirected to wp-login.php. Unfortunately i have a cronjob, that can not run, because it is also redirected, since its not a logged in user, who runs it. How can i get this to work ? Im posting my script below. It seems like, after wp-load.php is run, i can not get anything to work.
// Include WordPress
define('WP_USE_THEMES', false);
require_once('/var/www/intranet.fo/public_html/wp-load.php');
// wp_set_auth_cookie(9);
// $creds = array();
// $creds['user_login'] = 'my_username';
// $creds['user_password'] = 'my_pw';
// $creds['remember'] = true;
// $user = wp_signon( $creds, false );