Cmd command timeout in yml

For a particular command when runned in local machine using batch file, it takes 6min 22 seconds to complete execution.

The same command when directly invoked from yml i.e cmd /Q /C " the command " doesn’t run completely and terminates after 5 mins.

However the job timeout is set as 7days.

What could be the possible reason and how to debug if any process to do so ? And what could be a possible fix for it ?