It is the duty of the court to hold the defendant in custody unless bond is executed for the appearance of the prisoner at the next term of the court.