1

tell me how in java ee you can run a method that will work at a certain time, for example at 12 am? I tried to apply

@Lock(LockType.READ)
@Schedule(second = "/1")
public void atSchedule() throws InterruptedException {
//do something
}

but it didn't work, besides, I don't understand whether I need to call this method somewhere or the container will launch it itself?

chrylis -cautiouslyoptimistic-
  • 72,004
  • 20
  • 117
  • 147
Shrek1996
  • 19
  • 4

0 Answers0