You probably don't need this if you have an SSD. However, if you have that and many regular drives and sometimes experience a slowdown which disappears when you do a manual defrag, then this might help.
Run Task Scheduler, then go to the Microsoft - Windows - Defrag folder. You'll see a ScheduledDefrag entry if you set a schedule in the Defrag program.
The problem is that defrag will usually run if there's nothing else running. If you have some software that does, then it will think that the system isn't busy and thus will not defrag.
To fix that, create a new task in the same folder and copy the settings of the one made by Windows, making sure that you have the ff. in each tab setting:
General - change the user to system, check...