More information about the photocell circuit is needed since this appears to be the circuit design issue. Generically, "lock-out circuits" may be used, however, they require their "reset" after they perform their "lock-out" function.