What other fish are in the tank? Do they pose any threat to the eggs?
If you’ve just got the one barb that’s causing a nuisance, I’d think it would almost be better to move the barb to a temporary tank. But, that would only make sense if the barb is the only threat in the tank