Routine Scheduling
Keep in mind that the "Scheduled Time" is not the time the routine will run. It is the time that the routine is not allowed to run earlier than. Once the scheduled time has passed, the routine is eligible to be executed. You will notice this in the Itinerary as multiple routines can have the same start time but obviously cannot actually be executed at the same time.
Primary routines are run only when there are no ancillaries waiting. Gathering first to fill the gathering slots followed by Start Rallies then Join Rallies.
Most Ancillaries are run according to the schedule you configure but there can be some slight differences between different routines.
Routines that only ever need to execute once a day have the option to set the time of day it should be executed. e.g Arch of Triumph.
Some routines have the option to run at a specific time of day or regularly every X amount of time. e.g Black Market
Some routines run when they need to. For example:
Crazy Eggs will run when the egg cooldown time is expired. When a new egg is smashed, the next run time is scheduled for the earliest cooldown.
Alliance Science will reschedule after donating for when the 4 hour cooldown runs out.
Truce Agreement has varying options. This is a special routine (along with Server War). It is allowed to interrupt other ancillaries.
Idle Time is run ONLY when there no other routines scheduled.