well first of all, determine whether the eggs are fertile or not. Fertilized eggs will turn a light brown, unfertilized eggs stay white. if the eggs are fertilized and you are having a history of the Oscars eating them, it's probably best to remove the eggs and hatch them artificially. I'm guessing that your eggs are not fertilized, this is often when the Oscars eat them. This can be after a few hours, or even a few days. I've had Oscars who have tended eggs for up to five days, and then they eat them.
They might also eat the eggs if they are disturbed a lot in the tank. This is why if you are serious about breeding Oscars, you should only have them in the tank, no other fish. When you have other fish present, the Oscars don't like it at all, they get very aggressive and it can sometimes stress them.
unfortunately, if you leave the eggs in with the Oscars, there is no way you can stop them eating them if they so wish. There is another thing to bear in mind. It might not always be the Oscars are eating the eggs. Sometimes if the Oscars take their eye off the ball, the other fish will then scoff the eggs given half a chance, if you have got a Pleco present, they will often eat the eggs at night.