How to check windows task scheduler running status using standalone java application

Currently in my project I need to synchronize client database data to production database, for retrieving data from database I've used windows task scheduler to execute jar file using batch file.

While running scheduled task , jar file is executed more than once , because of that duplicate records getting saved.

I've also tested using Windows Scheduler's "Don't start a new instance approach." enter image description here