If at any time during the year expenses exceed revenues and a deficit is created, it shall be the duty of the mayor and aldermen, before appropriating any other sum for any other purpose, to appropriate a sufficient sum to immediately discharge any such deficit which has occurred,