Generally some tasks are required to be scheduled or dependent on the time. So this can be performed easily using windows service. Here are the steps to create windows service quickly.
Here are the steps to fix this problem:
Right click on My Computer and Goto Computer management…
Select Services and applications
Start indexing service If not started.