How To Close (But Not Force Close) Program Automatically On A Schedule

wokaka

Honorable
Jul 21, 2013
2
0
10,510
not sure if it's possible in Task Scheduler but i really want it to work. Basically I know how to automatically start program in Task Scheduler and how to also force close it. If we want to force close it we just create a .bat file with text like
Code:
TASKKILL /F /IM "nameofprogram.exe"
and schedule to run such file in specific time (for example 2.00.05 PM)

but this doesnt solve my issue because I need to automatically close my program without actually force close it. The above solution only force close the program and it's not what I want. I want to "properly" shut down the app, something like we click "X" in the program manually. Is that possible?

The problem is because I trade in MT4 automatically. if I use the above solution to close it on schedule, when it reopen, any change made to the object list in the MT4 would be deleted as if nothing ever added there. That's why I need a solution to automatically close my MT4 on schedule but not force close it. Any idea guys?
 

wokaka

Honorable
Jul 21, 2013
2
0
10,510
hi guys, after try to find more solution on Google apparently there's a very easy fix!

I should have not used the "/F". it force close the program!

should just go directly TASKILL /IM "nameofprogram.exe"

LOL