0
Well I need to finish a Node process from within js itself. What happens is that I have a cron that executes a command node meu_arquivo.js
and accurate within this meu_arquivo.js
end the Node so that it is not open.
How to do this ?
0
Well I need to finish a Node process from within js itself. What happens is that I have a cron that executes a command node meu_arquivo.js
and accurate within this meu_arquivo.js
end the Node so that it is not open.
How to do this ?
3
Call the method process
of the global object Exit:
process.Exit ([code])
Ends the process with the specified code. If omitted, Exit uses the 'success' code 0.
To come out with a 'fail code'':
process.Exit(1);
The shell that executed the node should see the output code as 1.
Browser other questions tagged javascript node.js
You are not signed in. Login or sign up in order to post.
I’ve never used it, but there’s Tree-Kill
– BrTkCa
@Lucascosta found something of Ode’s. I answered my question there
– Renan Rodrigues