I need help writing a script.

I want to be able to continuously haste any character. So I want what i type in to look like .haste (name) and then have it loop to cast haste upon that player again when his haste drops... how would i write something like that?