I have an application that should periodically play back some specific audio files (mp3). Let me give you one example: every Monday at 8:00 -> hello.mp3. How can I do this in Java? I am trying to use Calendar, JodaTime, but I cannot do this.
It depends if you use Java EE, you can use EJB Timer. And there is always Quartz http://www.quartz-scheduler.org/
, , - . Timer . ,
, Timer , Quartz Scheduler - ( ) use), cron- .
Timer
Spring , , .
java.util.Timer java.util.TimerTask . Quartz.
java.util.Timer
java.util.TimerTask
Spring, ( Quartz Scheduler, java.util.Timer ).
If you run the desktop application, the easiest way is to use java.util.Timer. For more complex schedules, use the Quartz Scheduler.
Source: https://habr.com/ru/post/1755317/More articles:CALayer, anchorPoint and level hierarchy - cocoaActiveRecord gives SQL "no such column" error for simple has_many association - ruby-on-railsHow to create an independent copy of Delphi TBitmap? - delphiКак преобразовать QMap> в QVariant? - c++Custom frame in WPF - wpfCan I zoom in on a webpage? - javascriptHow to find out from a ruby script whether it was launched from the command line or from a non-interactive process? - ruby | fooobar.comHow can I immediately update WPF binding - data-bindingRunning PHP script in the background without curls - phpMasking a text field without changing a model value in ASP.NET MVC - typesAll Articles