I'm trying to do a cli aplication in java with spring and picocli that you start it on cmd and with a dialog you do some configurations to program a task, (in this case show an "alarm messege" on the same cmd.) I used Timer and TimerTask and it works but I can't do anything else on cmd until the app do this task and finish.
That I would love is to config the task, finish this configuration dialog, be able to do anything else with the command line and in the date and time sheduled print a message on cmd or also a loop message every XX minutes.
I expended a lot of time trying to search a solution but may be this is not possible...
Other option that I'm thinking maybe would be a good solution would be a way to use a custom commands from any where in the cmd (as enviroment variables) and interact with application running on the background continously. In this way the cmd would be only a comunication way to send or recive information form this app in the background.
But again, I didn't find any way to do this neither.
Is there any way to do any one of this two options or do you have other idea to achive this task?
Thanks in advance!