The Torah forbade doing a melachah on the day of Shabbat itself, but if one begins a melachah before Shabbat and it continues of itself, it is permitted, as explained below. From the booklet Shabbat baHalachah ubaAgadah of Rabbi David Shalom Naki, shlit"a.