RE: Set up batch to run on aos A and/or B
That's true, the batches won't work if you don't have any CIL generated. I wonder how you could have failed CIL in your prod environment but still were using it for actual operations. Definetely asking for trouble.
Seems your environment maintenance process has some flaws if your one AOS didn't have functional CIL and the other did.
When you deliver code to prod, you must shut down all AOSes. Assuming you use modelstore delivery (MS recommendation) all AOSes get the CIL from model database when they start. If you use some other delivery process, you must run full CIL generation on one AOS, and all other AOS instances must be switched off. After succesful CIL generation, you start other AOSes and they fetch the CIL from the model database.
If you fail to do this, you face issues like the one you had. Or some AOSes run different CIL version than others.