Was working on the sabbath illegal?

It was illegal to work and engage in certain forms of recreation on the Sabbath in America's colonial period.