Update wp_query every week

I see two approaches: via cron job… or website / page cache which lasts 1 week.

In case you want to do the cache option: you just need to add 'orderby' => 'rand' to your WP_Query and install a caching plugin for your page, then set it up for 1 week.

CronJob: you need to setup a script which starts every week. For this you need to setup the cron job for your WordPress – https://www.siteground.com/tutorials/wordpress/real-cron-job/, then with the help of wp_schedule_event you can create a weekly task to update your posts.

error code: 523