Use right away or freeze*.
*Freezing Instructions
Hold back some of the oil when blending. Put the pesto in a container, cover with remaining oil, and freeze.
Pesto can also be frozen in ice cube trays, although I find it just as easy to freeze in mounds on parchment paper, and then transfer to containers.
Basil Pesto https://traditionalcookingschool.com/food-preparation/recipes/5-ways-to-preserve-your-herbs-including-easy-pesto-recipe/?utm_campaign=autoblog&utm_source=blog&utm_medium=bloglink&utm_content=5+Ways+to+Preserve+Your+Herbs+%28including+easy+pesto+recipe%29