Forum Discussion
Windows Server ScheduledDefrag Task Schedule not running
Hi Dave,
I checked the event viewer log and history in task scheduler, defrag schedule task had run. However, when we see the "defragment and optimize drive" application, it not defrag and optimize the drive. The drive still in high fragmented rate.
The default action of defrag schedule is correct?
It using below arguments for the defrag:
%windir%\system32\defrag.exe -c -h -k -g -$
Your post mentioned Server 2008, but 2008 does not have the arguments of -k -g -$ (in fact, 2008 uses / for arguments, not -), therefore your defrag would immediately exit out with an error status. That likely explains your issue.
Hold your WINDOWS key and tap R and type in CMD and tap enter. There type in DEFRAG.EXE /? and hit enter. Server 2008 has very limited options, nothing for file optimization (which moves the most important files to fastest portions of your disk).
Moreover, you probably should use the Degrag setting that comes in Task Scheduler already. Hold WINDOWS and tap R and type in TASKSCHD.MSC , in the popup's left pane navigate to TASK SCHEDULER LIBRARY > MICROSOFT > WINDOWS > DEFRAG
If you want to optimize your files as well, I suggest Auslogics Disk Defrag, it works on all Windows versions & is very fast when compared to Windows' built-in defrag.exe . If you can get an old version of Ausologics Disk Defrag, it will lack the annoying options to "buy now" and it also lacks the install of Auslogic's other products as trial versions. Unfortunately, it cannot be scheduled without purchasing, and the old version lacks optimizations for SSD (solid state) drives.
I hope this helps?
Have a great day!
JohnNeu