Yes of course, you would be paying on a per time basis.
With a task like hacking, its impossible to know up front if you will succeed or not, there has to be some form of vulnerability for you to exploit and you dont know if that is the case or not until after you have either found it, or spent an infinite amount of time trying to find it.