How to make spotlight follow spline path?

How can you make a light that would follow a line made with a spline path? Like a search light.

Is this your are searching ?

type or paste code here