Batch processes have a complete method, and it would be nice if it were possible to specify the callback for this using Underpin's array-based method. Something like this:
underpin()->background_processes()->add( 'example', [
'action' => 'example_action_name', // Action Name. Must be unique.
'task_action_callback' => function ( $item ) { // Callback to fire on a single item.
// Do an action
},
'complete_callback' => function (){
// Do an action on-complete
}
] );