Etymology
Today it means: Unproductively, uselessly. Full definition →
From fruitless + -ly.
Etymology from Wiktionary, CC BY-SA 4.0.