You can program this into your GAMS program. The GAMS/CPLEX-link returns with a license error in the solver status. If this happens, you could put your model to sleep for x seconds and try again:
repeat solve mymodel min z using mip; if (mymodel.solvestat=7, display$sleep(5) 'sleep 5 seconds for Cplex license'); until mymodel.solvestat<>7;
If your version of GAMS does not have the sleep
command, you could call 'execute “sleep 5”;
' to call an external program.