Courts schedule complex trials to take several days or even several weeks, but those trials often end early (due to a defendant changing his plea to guilty, for example) or get postponed (perhaps because a key witness is ill). That would leave a courtroom free, with the judge and court officials having no work to do.
In order to prevent this waste of resources, court hearings which take only a small amount of time (such as sentencing) are often placed onto 'warned lists', so that they can be slotted into the gaps left by other hearings which are postponed or end early.
The '18 hours' you refer to is the minimum notice which a defendant should be given as to when his hearing will take place. In practice rather longer notice is often provided. For example a trial might be scheduled to last from Monday to Friday but the defendant changes his plea to guilty on the Monday morning. The court Listings Officer will then start filling up the gaps in the schedule. A defendant on the warned list (or his solicitor) might be notified on the Monday afternoon, or on the Tuesday morning, that the hearing will take place on Wednesday, Thursday or Friday (depending upon how the Listings Officer arranges the court's timetable).
Chris