0 cron-job中未指定的响应代码

I have set my service to cron-job but cron job return the "0 Unspecified response code in crone-job" and when i run this service to my browser work well please tell me how to solve this problem my code is

function autoUpdateUserSpinz() {
    header('Content-type: application/json; charset=utf-8');
    $spinz = 0;
    //$user_id = $_POST['user_id'];
    $userSpinz = $this->mdl_file->getAllUserSpinz();
    foreach($userSpinz as $value) {
        $value['user_id'];
        $value['user_spinz'];
        if($value['user_spinz'] == 5) {
            $spinz = 5;
        } else {
            $spinz = $value['user_spinz'] + 1;
        }
        $this->mdl_file->updateUserSpinz($spinz,$value['user_id']);
    }   
}


public function updateUserSpinz($spinz, $user_id) {
    $this->db->query("UPDATE sz_users SET user_spinz= $spinz where user_id = $user_id");
}