I need to develop the following Java solution and I would like to double-check here that my approach is correct.
At the very basic level, I need the solution to (1) perform an automated activity at the same time every day. This requires no user input. (2) perform the same activity on an ad-hoc basis which is triggered by a user from a web application.
The solution will have two components. Firstly, a Java Windows service that performs the activity. Secondly, a simple Java Spring web application that will be used to trigger the service’s activity on an ad-hoc basis by the user. The web app will communicate with the Windows service through web services exposed by the Windows service. Both the Windows service and the web app will reside on the same server.
If this ‘activity’ was always triggered manually by a user, I’d have no problem incorporating it into a standard Spring web app. However, because I need it to be triggered automatically at the same time every day, my assumption is to separate it out of the web app and into a Windows service.
Is my design appropriate? Any feedback is welcome.