You shouldn’t try to control your intervals based on an exam deadline.
To start with – Anki’s main purpose is to schedule your easier cards for longer intervals, to give you more time to focus on your more challenging cards that actually need your attention. If your scheduling is accurate, those cards that are “pushed back till after the exam” shouldn’t need to be studied again.
You may see folks posting about doing this by setting a low max interval. Not only does that hold all of their cards down under an artificial ceiling – it doesn’t work. Unless they keep lowering their max interval every day, cards will still be scheduled after their exam. And if they do keep lowering it, forcing all of their cards to have shorter and shorter intervals … you can see how that’s the opposite of what spaced repetition is supposed to do.
If you have short-turnaround exam cycles – and you use FSRS – you can consider increasing your Desired Retention (DR) by a point or 2, which will make all of your intervals shorter [and give you a higher workload].
But whether you do that or not, when your exam gets closer, you can boost your confidence by using Filtered decks to study cards that you haven’t seen in a while or that aren’t due for a while.