When chilling the dough before baking, you get a cookie that holds it’s shape better and also results in a more tender cookie with better consistency. According to the USDA the dough will last up to four days in an airtight container or up to four months in the freezer, see more here.