When should I apply if still waiting on the H1B?

If my H1B is not selected, when is the optimal time to apply for CPT school? Should I apply now while awaiting H1B results?

It’s based on your current visa’s expiration date.
If your last day of the opt is 5/1, then it means you have time to wait until 5/1, and actually you might have the 60 days grace period after 5/1. You can either apply for a school before 5/1 or after, it’s all based on your job and if the school opens the enrollment window. However you have to note that you will not be able to work after 5/1.

If you’re still waiting on H-1B results, it’s best to apply for backup options like Day 1 CPT or grad school early—ideally before lottery results come out in March/April. If you’ve been selected but are waiting on approval, prepare a backup in case of delays or denial. If you received an I-797B (without change of status), you’ll need to maintain F-1 status by applying to a CPT program before your grace period ends. Don’t wait until the last minute—apply at least 2–3 weeks in advance to ensure a smooth transition.

If you got it this April, great.
If you’re gonna wait, the second round usually come out in August, September, no guarantee if it’s gonna come.
So you start application in August.
if your OPT ends before that, apply in April.