[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2010-11-09
4
Medium Priority
?
126 Views
Last Modified: 2014-11-24
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.
0
Comment
Question by:SourWasabi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:Bidonet
ID: 34094788
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

0
 
LVL 26

Accepted Solution

by:
pony10us earned 1000 total points
ID: 34253933
Try this:


rem Remove the "rem" in front of the version AT that you want to run. I suggest testing with
rem the first to make sure it is what you want

rem The following will kill it gracefully asking for confirmation if there are unsaved changes
rem AT 06:00 /every:su,m,t,w,th,f "taskkill /IM JKDefrag.exe"

rem The following will kill it forcefully without asking for confirmation
rem AT 06:00 /every:su,m,t,w,th,f "taskkill /F JKDefrag.exe"

Open in new window

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question