flask autosave data after specific time