Market timing doesn't have a very good track record in the long run, whether it is for individual stocks or the market as a whole. I'd suggest avoiding trying to time the market. Maybe it is on sale, or maybe the sale will get much deeper for longer. As far as 401Ks go, I'd suggest putting in as much as you can afford and at least the max of what, if any, matching your company does. Start as young as you can and cut back on other discretionary spending to maximize your contribution. If young and you have a roth option, take it. Do this continuously on a regular basis regardless if you think the market is overpriced or on sale.
Thanks,
Jack