title: ScheduledExecutorService Java EE how to start it in web service (JBoss)?
body: <p>In Java SE I have a scheduled tasks waiting to be executed when I run main().</p>
  
  <p>But in Java EE (JBoss webservice) the methods are run when there's a web request.</p>
  
  <p>Is there a way to start scheduling tasks once the application is deployed?</p>
  
  <p>I was looking to use <a href="https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow noreferrer"><code>ScheduledExecutorService</code></a>.</p>