How to create a Windows php automation script?

I want to create a windows php automation script that works for windows related tasks (preferrably windows xp/7)
For example: delete the files in Temp folder of windows after every 6 hours.
Can it be done?
Any help?
