Sending an email every half hour if a certain condition is met
We know what this is 30*60*1000 but you should put that into a variable instead of just letting it lay around out there naked like that.

public long waitTime = 30*60*1000;


and you can put it in whatever scope that you want to and use it as often as you like, just make sure that if you change it you know what it will affect.