In every case where imprisonment in the penitentiary is awarded against any convict, the form of the sentence shall be, that he or she be punished by confinement at hard labor; and he or she may also be sentenced to solitary imprisonment for such term as the court shall direct, not exceeding twenty days at any one time; and in the execution of such punishment the solitary shall precede the punishment by hard labor, unless the court shall otherwise order.