I
I
Ivan2017-09-12 09:13:57
Java
Ivan, 2017-09-12 09:13:57

How to do it right from a technical point of view?

Good morning!
Stuck on this issue. There is an application (jar) that sends requests to the VK api, if the desired result comes, it sends an email to the desired address. Right now this application is just launched and works as a console application, but I want to make it run in the background so that I can view the progress of the work, and so that it starts automatically after rebooting the computer. I look towards Tomcat, but is this correct? Maybe there is an easier way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2017-09-12
@bessovesti

what for for this purpose to raise the server (makes sense only if remote access is necessary)?
console applications run perfectly in the background, start with the system, and you can simply watch the exhaust.

S
Sergey Gornostaev, 2017-09-12
@sergey-gornostaev

It's better to make a background service running two daemonized threads. One thread will execute the logic of your console application, and the second thread will provide a web interface for monitoring and control using the integrated jetty.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question