Usually by 10:00 AM. Scratches are posted soon thereafter. With big races, such as the Kentucky Derby, Preakness, Belmont and Breeders' Cup, scratches are taken the day before so the AE can draw in. A scratch on the day of a big race, no AE's draw in.
For regular races, the AE sometimes scratches if they know they won't draw in, or if they are main track only and the race stays on the turf. For AE (MTO), if the race is taken off of the turf or if it's a rainy day and there is a good chance of the race being moved to the main surface, the AE won't scratch.
In Ireland and the UK the following applies:
One hour before the beginning of the first race.
If there is a non-runner in a race and the trainer of a reserve is offered the opportunity to race, the trainer is not obliged to run their horse. The horse will be considered balloted out of the race and there will be no entry or declaration charge.
If trainer wishes to run, simply contact the racecourse at least one hour before the running of the first race and declare both the horse and rider. The trainer of a non runner is obliged to contact each of the reserves.