The patronage system during the Baroque and Classical periods involved financial support of musicians by the church and wealthy members of society. Composers would write works determined by their patron in exchange for economic security. Johann Sebastian Bach held positions that required him to write music for his patrons at courts in Weimar and Cothen. Mozart worked as a composer for the Bishop of Salzburg but later struggled to find patrons in Vienna. Haydn thrived under the patronage system, producing symphonies and quartets for over 30 years for his patron Prince Esterhazy. Elements of the patronage system still exist today through crowdfunding websites that support creators' projects.