How to show alert to user two times ?

one alert to be shown after x minutes and another alert to be shown after y minutes of page loading.

x,y are just parameters which I'll set. e.g x=10 y =20 ..