The compat task does not accept tell commands according to the Domino Administration Help.
But if you want to stop compact task through a program you can use the command TELL COMPACT QUIT.
https://www-304.ibm.com/support/docview.wss?uid=swg21099361