Haydn served the Esterhazys uninterruptedly for the long period of thirty years. Here's the agreement he signed with the prince Paul Anton:
FORM OF AGREEMENT AND INSTRUCTIONS FOR THE VICE-CAPELLMEISTER
"This day (according to the date hereto appended) Joseph Heyden [sic] native of Rohrau, in Austria, is accepted and appointed Vice-Capellmeister in the service of his Serene Highness, Paul Anton, Prince of the Holy Roman Empire, of Esterhazy and Galantha, etc., etc., with the conditions here following:
"1st. Seeing that the Capellmeister at Eisenstadt, by name Gregorius Werner, having devoted many years of true and faithful service to the princely house, is now, on account of his great age and infirmities, unfit to perform the duties incumbent on him, therefore the said Gregorious Werner, in consideration of his long services, shall retain the post of Capellmeister, and the said Joseph Heyden as Vice-Capellmeister shall, as far as regards the music of the choir, be subordinate to the Capellmeister and receive his instructions. But in everything else relating to musical performances, and in all that concerns the orchestra, the Vice-Capellmeister shall have the sole direction.
"2nd. The said Joseph Heyden shall be considered and treated as a member of the household. Therefore his Serene Highness is graciously pleased to place confidence in his conducting himself as becomes an honourable official of a princely house. He must be temperate, not showing himself overbearing towards his musicians, but mild and lenient, straightforward and composed. It is especially to be observed that when the orchestra shall be summoned to perform before company, the Vice-Capellmeister and all the musicians shall appear in uniform, and the said Joseph Heyden shall take care that he and all members of his orchestra do follow the instructions given, and appear in white stockings, white linen, powdered, and either with a pig-tail or a tie-wig.
"3rd. Seeing that the other musicians are referred for directions to the said Vice-Capellmeister, therefore he should take the more care to conduct himself in an exemplary manner, abstaining from undue familiarity, and from vulgarity in eating, drinking and conversation, not dispensing with the respect due to him, but acting uprightly and influencing his subordinates to preserve such harmony as is becoming in them, remembering how displeasing the consequences of any discord or dispute would be to his Serene Highness.
"4th. The said Vice-Capellmeister shall be under an obligation to compose such music as his Serene Highness may command, and neither to communicate such compositions to any other person, nor to allow them to be copied, but to retain them for the absolute use of his Highness, and not to compose anything for any other person without the knowledge and permission of his Highness.
"5th. The said Joseph Heyden shall appear in the ante-chamber daily, before and after mid-day, and inquire whether his Highness is pleased to order a performance of the orchestra. After receipt of his orders be shall communicate them to the other musicians and shall take care to be punctual at the appointed time, and to ensure punctuality in his subordinates, making a note of those who arrive late or absent themselves altogether.
"6th. Should any quarrel or cause of complaint arise, the Vice-Capellmeister shall endeavour to arrange it, in order that his Serene Highness may not be incommoded with trifling disputes; but should any more serious difficulty occur, which the said Joseph Heyden is unable to set right, his Serene Highness must then be respectfully called upon to decide the matter.
"7th. The said Vice-Capellmeister shall take careful charge of all music and musical instruments, and shall be responsible for any injury that may occur to them from carelessness or neglect.
"8th. The said Joseph Heyden shall be obliged to instruct the female vocalists, in order that they may not forget in the country what they had been taught with much trouble and expense in Vienna, and, as the said Vice-Capellmeister is proficient on various instruments, he shall take care to practice himself on all that he is acquainted with.
"9th. A copy of this agreement and instructions shall be given to the said Vice-Capellmeister and to his subordinates, in order that he may be able to hold them to their obligations therein laid down.
"10th. It is considered unnecessary to detail the services required of the said Joseph Heyden more particularly, since his Serene Highness is pleased to hope that he will of his own free will strictly observe not only these regulations, but all others that may from time to time be made by his Highness, and that he will place the orchestra on such a footing, and in such good order, that he may bring honour upon himself, and deserve the further favour of the Prince, his master, who thus confides in his zeal and discretion.
"11th. A salary of four hundred florins to be received quarterly is hereby bestowed upon the said Vice-Capellmeister by his Serene Highness.
"12th. In addition, the said Joseph Heyden shall have board at the officers' table, or half a gulden a day in lieu thereof.
"13th. Finally, this agreement shall hold good for at least three years from May 1st, 1761, with the further condition that if at the conclusion of this term the said Joseph Heyden shall desire to leave the service, he shall notify his intention to his Highness half-a-year beforehand.
"14th. His Serene Highness undertakes to keep Joseph Heyden in his service during this time, and should he be satisfied with him, he may look forward to being appointed Capellmeister. This, however, must not be understood to deprive his Serene Highness of the freedom to dismiss the said Joseph Heyden at the expiration of the term, should he see fit to do so.
"Duplicate copies of this document shall be executed and exchanged.