Right, the check engine light will normally never go off.

The crank sensor just fails and when it does, stops the signal and then the PCM thinks the car is shut off and stops spark and the car dies. But then you shut it off and restart it and sensor works again untill it fails again.

I'd buy a new one and install it, there is a write up in the how to section that shows you what tools you need and how to change it.