An improved method and apparatus are disclosed for controlling flow of fluid through a conduit disposed within a well extending beneath the surface of the earth. The apparatus includes a subsurface valve situated on the conduit and provided with means for actuating the valve between an open and closed position to control the flow of fluid through the conduit. The valve automatically closes at the end of a preset flow period unless reset in response to an external signal to reinitiate the predetermined period to closure. Normally a surface generated signal, as for example a pressure pulse, is periodically directed to the actuating means to reinitiate the flow period. The frequency of the pulses is adjusted as required to assure that the actuating means will receive a pulse prior to the end of the flow period so flow will not be interrupted. If the pulses are interrupted, as for example by a rupture in the well conduit, the valve will close automatically at the end of the flow period.