Theroically, after you canceled your EP, you cannot be employed and work any more, so supposely you should do it after you finish your last working day. But if you go before that, they will also do it for you. Once the EP is canceled, you'll treated as illegal work if you still work in S'pore. But if you do it for only a few days, nobody care also.