School vending machine

A student buys snacks from a vending machine at Mission High School in San Francisco. (Justin Sullivan/Getty Images)

Public schoolchildren have exactly one more school year to buy high-calorie sandwich cookies and sugary energy drinks from vending machines and snack bars at school.

Beginning in the 2014-15 school year, public schools across the country will have to comply with new standards for snacks sold on their campuses.

Those new standards include limits on calorie, fat, sodium and sugar for all foods and drinks sold during the day at 100,000 schools.

Doughnuts and cookies will be out, baked chips and granola bars will be in. Sugary drinks like fruit punch and sports drinks will be replaced by no-calorie flavored water and diet sodas.

The new standards were laid out by the U.S. Department of Agriculture on Friday.

To be clear, the USDA snack standards only affect food and drinks sold at schools during the day and do not apply to food that kids bring from home.

School groups can still sell bags of chocolate chip cookies and brownies at fundraising bake sales on campus--once the school day is over, and kids can still bring in cupcakes for the class on birthdays.

The USDA regulations for snacks sold at schools follows on the heels of nutritional guidelines for subsidized school lunches that were revised last year and implemented last fall.

"Millions of children will benefit from having healthier options because of the updated USDA standards for snacks and drinks sold in schools—where many of our kids consume up to half their daily calories," said Maya Rockeymoore, director of Leadership for Healthy Communities, a policy group that is working to fight childhood obesity, in a statement. 

In a recent study published in the Journal of the American Medical Assn. Pediatrics, researchers found that as of mid-June, more than three quarters of the nation's public elementary schools faced no state or district limits on the sale of candy, salty snacks and sugary drinks.