The compensation provided for a commissioner, deputy commissioner, county agricultural inspector, or clerk who is employed by the year or by the month shall be paid out of the county treasury in the same manner and at the same time as county officers are paid. A commissioner and each deputy commissioner or inspector is entitled to receive his traveling and incidental expenses which are necessarily incurred in the performance of his duty. Such expenses and all compensation which is earned by a commissioner, deputy commissioner, inspector, or clerk who is not employed by the year or by the month are a county charge. The board of supervisors shall allow and pay them in the same manner as other claims are allowed and paid.