• Look up "Checkpoints" in SSIS. It is designed to save checkpoints so it can restart where it left off.

    You could also handle this through the control flow and some variables. You should not have to write any code to do what you are describing.