Sometimes My Truck Won't Crank

Does your truck have an automatic or manual transmission? If it’s an automatic just shift into neutral when you have the no-start problem. If it starts it’s probably a bad neutral safety switch. If it’s a manual then the neutral safety switch is on the clutch. It can cause the same no-start symptoms. Have you cleaned the battery posts and cables?