I'm trying to execute a bat script that contains a timeout in it. I execute the bat file from node asynchronously but node seem to completely ignore the timeout inside the CMD.
JS FILE:
const fs = require("fs")
const util = require("util")
const exec = util.promisify(require("child_process").exec)
async function executeBat(){
await exec("C:/PktmonScripts/getPhonesMacScript.bat")
do things
}
BAT FILE:
timeout /T 40 /NOBREAK > nul
P.S: The timeout works when I execute the script on cmd..