Pause for dot affly

hello I tried to make a macro and put the dots for example agony with a pause so as to recast it before it expires so:
/cast agony
/click pause 15
so that it reapplies agony after 15 seconds since it lasts 18 seconds
but does not do it in macro because?
I created a new macro called agony and copied it into the main macro /click agony