Avatar of SourWasabi
SourWasabi
 asked on

Syntax/Switch that will allow me to stop JKDefrag at 6AM

I need to find out what switches need to be installed in the defrag script, or what syntax will allow me to put in a stop time.

We are currently using the program JKDefrag, the batch command is started from Windows Scheduled Task, but I've had no success finding a syntax that will allow me to put in a stop time (6AM). The code is below.

"AT 4:00 /every:su,m,t,w,th,f,s "C:\Windows\JKDefrag.exe" -example-

Edit to suit your needs

Time Format is 24 hour Military time

AT 12:00 /every:su,m,t,w,th,f,s "C:\Windows\JKDefrag.exe" (IT)

AT 18:00 /every:su,m,t,w,th,f "C:\Windows\JKDefrag.exe" (Servers)"



Any help would be appreciated.
Windows Batch

Avatar of undefined
Last Comment
Steven Carnahan

8/22/2022 - Mon
Bidonet

I think you should use the SCHTASKS command instead.  You have the option to create and end a task.

http://ss64.com/nt/schtasks.html

ASKER CERTIFIED SOLUTION
Steven Carnahan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy