Move slow work off the request
Anything over a second probably shouldn't block a page load.
This runs during a web request and takes <n> seconds: <describe> Move it to the background. My stack is <stack> and I'd rather not run extra infrastructure unless I have to. - Recommend the simplest mechanism that fits (a queue, a cron, a worker) and say what it costs me to operate. - Show me how the user finds out it finished. - What happens if the job fails halfway? Can it safely be run twice?
"Can it safely run twice?" is the question that separates a background job from a background incident. Retries will happen whether you planned for them or not.