A Boolean neural network controlling task sequences in a noisy environment