Java batch application keep running behind even if it is ended in task scheduler. Task scheduler shows Ready status and application behind still not getting stopped.
Asked
Active
Viewed 274 times
-2
-
Could you give us more information about what are you trying to do and what your problem actually is? This question is very vague. What java application? What are circumstances? What configuration is used? And other things you feel might be useful – John Smith Mar 06 '18 at 17:49
-
A java batch application which being ran by windows batch file(.bat). This application being scheduled in task scheduler(windows app) in windows sever 2012 R2 to run once a week. If I end the job in task scheduler, the status is being moved from running to ready but application backside keeps working still. @JohnSmith – Ganesh Mar 06 '18 at 18:07
1 Answers
1
If I understand your setup correctly, you have a windows .bat file, from which you run java application (command like java -jar myapp.jar
) and that .bat file is started and stopped by windows task scheduler.
My guess is, that when .bat file is started it invokes java app (as expected), but when you kill it, only thing that gets killed is the .bat "container", not the actual app. And since the scheduler is linked with .bat file and it is not running anymore, it shows that the program is stopped (because it is. The "container script" itself is not running anymore) and the stop signal does not propagate to the java application (or it just ignores it)
Can't you set task scheduler to run java app directly? That would definitely help

John Smith
- 160
- 8