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-
  • 75,269
  • 21
  • 115
  • 152
Shrek1996
  • 19
  • 4

0 Answers0