Execute task for X seconds