most of the time. By that I mean, if you have $10k available to invest right now, odds are you will be better off investing it all today than investing it over time, say $1k per month for 10 months.
That being said, people should absolutely automatically invest every single month into their 401k, IRA, 403b, etc. Doing the simple, regular things like that and taking emotion out of investing will lead to the best outcome for the overwhelming majority of people.