save in the end of scheduled task