Use update_post_meta to older posts August 28, 2022 by Tarik Billa take a look at: Automatic Refresh all posts at once its about the same question and the answer will do for you too.