Section 24. At a sitting of the court at which criminal business may be transacted, cases arising under chapters one hundred and nineteen, two hundred and forty-eight, one hundred and thirty-eight, one hundred and thirty-nine and two hundred and seventy-three shall have precedence in the order in which said chapters are herein named, next after the cases of persons who are actually confined in prison and awaiting trial; provided, that the court, on motion of the district attorney, may order that the trial of any specified case of crime shall take precedence over all other cases.