Help with logic in saving tables

yes that was my plan…but how would I detect when time slots ends and save the table only once?