Jenkins jobs fails with error "The batch file cannot be found. Build step 'Execute Windows batch command' marked build as failure"

I have batch script calling some python files configured in Jenkins jobs as below:

‘’‘python script.py --commandline_parameter1 value1’‘’

If the script.py execute for longer time, sometimes I am seeing an error as mentioned below while the script execution is successful and I am getting the expected output also. But only the Jenkins job status will be Failure.

The batch file cannot be found. Build step ‘Execute Windows batch command’ marked build as failure Finished: FAILURE

The Job is Success when the script runs for shorter time without any failure.

Why is it happening? And what can be the fix for this ?

I can’t put a exit 0 as I actually need to know if there is an actual failure in the script also.