To “knock off work” might be for any length of time, but it usually means for the day.
The expression certainly had significance to those who first used it, because they were the oarsmen of a slave galley.
To keep the ship on course, the slaves were kept rowing in unison by a drumbeat pounded out rhythmically on a block of wood.
Different beats had different meanings, such as the left or right side only or altogether.
These beats also signaled rest breaks and the end of a shift when the slaves were “knocked off” for the day.