Question Any software to shut down a program at a predetermined time?

Shaun98

Honorable
Mar 11, 2015
462
0
10,790
Hi, i have use a software for work that tracks our repairs etc and i have recently set up a daily backup of our programs folder so we don't loose any data. Only problem is the software wont backup whilst its running. i have set the backup for 5:10pm each day. im wondering if theres any task killing software that can shut down the program ten minutes before the backup is due?

i know i have used similar things on android to turn off music apps and stuff after a few hours but is there anything similar on windows that anyone knows of?

Thanks
 

Ralston18

Titan
Moderator

Shaun98

Honorable
Mar 11, 2015
462
0
10,790
hi, u can use command prompt tool called taskkill
taskkill /IM "notepad.exe" /F

u can shedule it with microsoft task sheduler

or u can alternatively setup task scheduler for your backup app
in settings set it to kill already running instance
Thanks for the help do you know i would go about setting a time with the taskkill /IM "notepad.exe" /F command?
 

Shaun98

Honorable
Mar 11, 2015
462
0
10,790
you could use task scheduler to restart the computer 10-15 minutes before the backup. the reboot should shut down all programs, reboot the system and allow the backup as scheduled with nothing running.
Thanks had a look in task scheduler and it only give me the option to shut down, send a message or send an email ill look further into it and see what i find
 

Shaun98

Honorable
Mar 11, 2015
462
0
10,790
Windows 10?

Take a look at Task Scheduler.

There are multiple "how-to's" online.

For example:

https://helpdeskgeek.com/windows-10/use-the-windows-10-task-scheduler-to-automate-almost-anything/

[Note: Open Task Scheduler to learn what, if anything, may already be in there. Some apps seem to be "taking advantage" of the application for their own purposes.]

Do test carefully and only after you know that the daily backups are safely done, recoverable, and readable.
thanks! ill check the guide now been googling it all morning and all the guides are to shut down
 
This is a batch script i made for our camera server at work. Inside task scheduler i have it set to run the batch file at a certain time. So the first thing it does is kill the blueiris program so its not writing to the drives, then cleans anything older then 7 days off the drives, then auto restarts the camera software.

taskkill /F /IM BlueIris.exe
ForFiles /p "E:\100 outside south" /s /d -7 /c "cmd /c del @file"
ForFiles /p "E:\105 dock north" /s /d -7 /c "cmd /c del @file"
ForFiles /p "G:\101 outside north" /s /d -7 /c "cmd /c del @file"
ForFiles /p "G:\104 dock east" /s /d -7 /c "cmd /c del @file"
ForFiles /p "I:\102 rigging west" /s /d -7 /c "cmd /c del @file"
ForFiles /p "I:\107 server room" /s /d -7 /c "cmd /c del @file"
ForFiles /p "L:\103 rigging east" /s /d -7 /c "cmd /c del @file"
ForFiles /p "L:\106 break room" /s /d -7 /c "cmd /c del @file"
ForFiles /p "M:\108 as northeast" /s /d -7 /c "cmd /c del @file"
ForFiles /p "M:\110 dock south" /s /d -7 /c "cmd /c del @file"
ForFiles /p "N:\109 my office" /s /d -7 /c "cmd /c del @file"
ForFiles /p "N:\111 as southeast" /s /d -5 /c "cmd /c del @file"
ForFiles /p "N:\112 as southwest" /s /d -7 /c "cmd /c del @file"
START C:\"Program Files"\"Blue Iris 4"\BlueIris.exe


If you know how long the backup software takes you could kill the .exe that needs to die run the backup software and then set another task to restart the .exe that you first killed.
 
One think to be careful with: Killing the app in question (instead of gracefully closing it) might leave database in inconsistent state. Before you implement this - make a backup in regular way, then try killing with new data you can lose and recreate.

If your application can be shut-down using keyboard only (eg, <Alt>-F, X, Y), you better use some keyboard script to shut it down.