Automatic on demand runs only the train for a certain part of the planned schedule in auto mode. Before and after the train is available for doing manual operations like shunting on a yard to fetch or deliver freight loads.
Basically it is already available:
After reaching the destination the automate for this train will go idle.
In this idle state the train can do its manual shunting and do a next run after this is done.