I want my web server (Tomcat 8.5) to send emails automatically once every day while it's running. So I configured a StartUp-Servlet in web.xml to run on server startup. When I test it in eclipse, I get the error Starting Tomcat v8.5 Server at Localhost has encountered a problem. Server Tomcat was unable to start within 45 seconds...
I know, this is something happening in eclipse, but it seems, that the startup doesn't finish, and my server will never be able to to other tasks as it's busy starting up... I want it to instantiate the scheduler, but then finish start up and run the scheduler 'in background'.
What is the right way to trigger the scheduler during server start?