URL Loggers Command-line Parameters

More
2 years 1 month ago #24023 by prashant
Using script (such as below) we are able to code such as below ,in such a way that we don't wait for the code to finish , simply handover and move on ,

if the same has to be done using new arguments of command line , do we need to pass parameters , or the script will wait for execution to finish?


const fs = require("fs"); const { spawn } = require("child_process"); try {   const WORKING_DIRECTORY = "C:\\Program Files\\DB Software Laboratory\\Advanced ETL Processor Enterprise\\";   const fileToExecute = "C:\\Program Files\\DB Software Laboratory\\Advanced ETL Processor Enterprise\\aetlcl.exe";   const objectId = 7323   const parameters = [objectId,logId];   logger.info(parameters);   spawn(fileToExecute, parameters, { cwd: WORKING_DIRECTORY, detached: true });   return 200; } catch (err) {   logger.error(`Caught an error: ${err.message ? err.message : err}`);   return 500; // Any error caught here results in a 500 status }

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #24028 by Peter.Jonson
The script will not wait for the execution to finish

Peter Jonson
ETL Developer
The following user(s) said Thank You: prashant

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save