using java scheduler