I have a Whirlpool WFG530SOESO range that I purchased new a few years ago. For a little while now it has been hit and miss if the oven works. You can always hear the igniter clicking and smell some gas but it doesn't always ignite and heat up. The clicks go in a burst of 3-4 clicks at a time for 3 or 4 times then the oven ends trying. Sometimes it ignites on the first burst other times I restart it a few times before giving up. What would cause it to ignite sometimes and sometimes not ignite?
The clicking sound is the spark module trying to ignite the gas. You should be able to verify that it is actually sparking. Since the oven does light intermittently check to see if the openings in the burner are blocked.
With a toothpick probe each opening for obstructions. If it continues working erratically it could be gas pressure regulator.