It depends on the bank and network. Banks are to provide outgoing data at the certain time for the processing by the central clearing house (the Federal Reserve system, for ACH), which then distributes incoming data back to the banks.
All this has to be done between the closing of the business day and the opening of the next one. If the transaction hasn't completed the full path during that time - it will wait at the position it was stuck at until the next cycle - next night. That's why sometimes ACH transactions take more than 1 day to complete (if, for example, multiple Fed banks have to be involved).