No need for 3rd party apps, WinXP has a command line defrag utility included. Assuming you performed a standard install of WinXP, confirm you have a file called DEFRAG.EXE in your C:\WINDOWS\SYSTEM32 directory. If you don't, we'll need to edit the BAT file, but DEFRAG.EXE *should* exist in the directory noted above.
So...
[1] Save the attached file (DEFRAGME.BAT.TXT) to a directory. For the sake of example, save to the C:\WINDOWS directory.
[2] Rename the file from DEFRAGME.BAT.TXT to DEFRAGME.BAT
Then, add the BAT file to your Scheduled Tasks:
Start | Settings | Control Panel | Scheduled Tasks | Add Scheduled Task
Following the Scheduled Task Wizard:
[1] Next
[2] Click the program you want Windows to run. Browse to C:\WINDOWS and select DEFRAGME.BAT
[3] Set the top-level recurrence: daily, weekly, etc.
[4] Set the detail-leve recurrence: Time, day-of-week, etc.
[5] Enter Username and Password you use to log on to the PC
[6] Finish
P.S. If you want to defrag a drive other than the C: drive, just edit the BAT file accordingly. PM/IM me if you need help.