…if you have low traffic on your site it may never run due to the way how WP Cron works
In your particular example it should always fire. Since save_post
runs just before a browser redirect, the subsequent request back to the edit screen will fire the cron schedule.
…won’t that delay the page rendering the next time WP Cron is triggered by a page load?
No. If you check out spawn_cron()
, you’ll see it fires a parallel request to process the schedule.
From the codex:
Send request to run cron through HTTP request that doesn’t halt page loading. Will not run more than once every 60 seconds.