 He held the post until his voluntary retirement in 1923, on the occasion of his seventieth birthday.In Vienna he was succeeded by Arthur Schattenfroh (1869–1923), who held the chair from 1905 to 1923.During his last years, Gruber concentrated completely on his duties as president of the Bavarian Academy of Sciences.