Uselessly (2,4)
I believe the answer is:
in vain
(Other definitions for in vain that I've seen before include "Without achieving anything" , "Uselessly, a waste of time" , "Without success or result" , "To no end" , "Uselessly, without any progress" .)