The queue is given the command. The command has the functions I want to run, including the context and what I want done with the result. It can be a closure right up to a full class.
Using a framework like Laravel I can even "chain" queued commands - so CommandA will queued, then call CommandB when it is done etc.
I've never run into a situation that wasnt easily solved by this.