Upon the application of the superintendent of the workhouse, the board of workhouse commissioners, if there is one, otherwise the judge of the circuit court, criminal court or general sessions court having jurisdiction in the county, may by order direct the superintendent of the workhouse to permit a prisoner serving a misdemeanor sentence to leave the workhouse during necessary and reasonable hours for the purpose of working at the prisoner's employment, conducting the prisoner's own business or other self-employed occupation including, in the case of a woman, housekeeping and attending to the needs of her family, seeking employment, attending an educational institution or securing medical treatment. T.C.A. § 41-2-128(a).
Similarly, the judge of the circuit court, criminal court or general sessions court having jurisdiction in the county where the person is imprisoned may, upon application of the sheriff, enter a like order for the same purpose for jail prisoners. The order may be rescinded or modified at any time with or without notice to the prisoner. T.C.A. § 41-2-128(a).