It's very rare that a company will ask for your completed script or spec script without paying in advance for the right to set it up. According to the Writers Guild of America, the union that governs film and television writers, this is called an if-come deal and can only be used in the case of television motion pictures. The Guild rule states that money need not be paid to the writer only as long as the production company is actively seeking licensee interest or other financing. The specifics of the contract must be negotiated in advance so that if the producer sets up the project, the writer's deal will already be in place and he will be attached to the project.
Since the producer's “active efforts” are the key, no specific time limit is involved. If those efforts cease at any time, the producer has no further rights and has to let the material revert back to the writer, or renegotiate a new contract. One interesting thing to note about the if-come deal is that, as long as it's in place, no development work can be done on the material. The producer can't ask the writer for changes or additional drafts or work of any kind. The production company can only seek financing and generate interest while the if-come deal is in effect.