Its not too hard to figure out when the fee will be on the statement, So all I do is to cease using the card around 2 weeks or so before I know the fee will be charged. there are many times that the posting can/will be delayed and if it hits after the Statement with the fee closes you wont get the miles etc from it.
also its best to cancel or not set up any automatic billing to a card you dont plan to keep.