I have an app.exe
file which I want to be terminated every monday at 19:00.
Is it possible to schedule tha task which terminates app.exe
?
schtasks /create /tn termination /tr "taskkill /f /t /im app.exe" /sc weekly /d mon /st 19:00
creating a task named termination (/tn
) that runs weekly (/sc weekly
) every monday (/d mon
) at start time of 19:00 (/st
)
schtasks /query /tn termination
viewing the created task queried by name
Folder: \
TaskName Next Run Time Status
======================================== ====================== ===============
termination 2014.11.3 7:00:00 PM Ready
ps:
here tasklist
terminates the process tree (/t
) by it's image name (/im
) forcefully (/f
) (without prompting for confirmation)
Expanding what @Ƭᴇcʜιᴇ007 has suggested:
Create a scheduled task in task scheduler and task to run should be:
taskkill /im <your application name>.exe /f
You may have to schedule this task to run as administrator.
taskkill /?
= "This tool is used to terminate tasks by process id (PID) or image name."taskkill /?
? Or taskill/? can be run by Windows Scheduler itself?