Most ovens rely on the spark electrode doing 2 things firstly lighting the oven but then causing flame rectification so once a flame is noticed it should stop sparking.It could be a dirty contact,a broken spark probe or sparklead,or a faulty Pcb if you have one.Not sparking at all could be a faulty ignition switch or a spark generator fault,though this is unlikely as you say it works more than not.
Tony S, March 2009