use the feature "set it and forget it". there should be an option there to do exactly what you want it to do.
but i wouldnt recommend defragging it everytime you boot it up. do it like a 3AM or something.
im sure your boot time will slow down a LOT of you set it to defrag then.