It shall be the duty of the sheriff of every county in which any criminal is sentenced to confinement in a prison, to cause the convict to be removed from the county jail without needless delay after sentence, and conveyed to the proper prison and delivered to the warden of that prison.