actually I run my exec task in an async function. After execution a software starts and runs in a loop.
After this execution, my node.js app stops going on with the code.
How can I start running another app out of node.js and ignore the result and go on with the code?
import util = require('util');
const exec = util.promisify(require('child_process').exec);
export class ExecClass{
public static async run(...parameters: (number | string)[]) {
const app=parameters[0];
parameters=parameters.slice(1);
const cmd = app+ " " + parameters.join(" ");
const { stdout, stderr } = await exec(cmd);
}
}
EDIT:
After my calling code I just make some edits in my database.
my calling code:
import {ExecClass} from "./exec-class";
async function run() {
await ExecClass.run(cmd, data.id, data.startDate, data.endDate, data.idx);
}