After attending the Gymnasium in Weimar, he studied at the University of Jena, where was appointed to an adjunct position in the philosophy faculty in 1676.
In 1680 he became vice-rector of the Berlinisches Gymnasium zum Grauen Kloster in Berlin, serving as rector from 1698 until his death.
He may have written it to console his sick friend, the cantor Severus Gastorius, who may have wished a song for his funeral.
His 1724 chorale cantata Was Gott tut, das ist wohlgetan, BWV 99, is based on the complete hymn, with paraphrases of the inner stanzas.
In 1726, he composed the cantata Was Gott tut, das ist wohlgetan, BWV 98, beginning with the first stanza.