If you are trading with Zerodha, you do not have to go through all this hassle. you tick this option and they do it for you automatically.
With some brokers, they are not quite sure which day exactly they are doing the settlement, so if you plan to do it manually there are too many inconvenience attached to this.