In Node-Red, how to execute a script with arguments but not wait for completion?
up vote
0
down vote
favorite
I want to message a telegram bot a code which is used as an argument for a python script. Problem is, the script does a sleep function until the day/time it needs to run.
Is it possible to run a script without waiting for completion; sending it to the background so that node-red can execute another instance of the script when it gets a new code from telegram?
I tried the daemon node but it doesn't have a feature to add arguments from the payload, unless I am doing it wrong.
node-red
add a comment |
up vote
0
down vote
favorite
I want to message a telegram bot a code which is used as an argument for a python script. Problem is, the script does a sleep function until the day/time it needs to run.
Is it possible to run a script without waiting for completion; sending it to the background so that node-red can execute another instance of the script when it gets a new code from telegram?
I tried the daemon node but it doesn't have a feature to add arguments from the payload, unless I am doing it wrong.
node-red
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to message a telegram bot a code which is used as an argument for a python script. Problem is, the script does a sleep function until the day/time it needs to run.
Is it possible to run a script without waiting for completion; sending it to the background so that node-red can execute another instance of the script when it gets a new code from telegram?
I tried the daemon node but it doesn't have a feature to add arguments from the payload, unless I am doing it wrong.
node-red
I want to message a telegram bot a code which is used as an argument for a python script. Problem is, the script does a sleep function until the day/time it needs to run.
Is it possible to run a script without waiting for completion; sending it to the background so that node-red can execute another instance of the script when it gets a new code from telegram?
I tried the daemon node but it doesn't have a feature to add arguments from the payload, unless I am doing it wrong.
node-red
node-red
asked Nov 8 at 17:07
Dom Gregori
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
The 'Exec' node can be configured to output messages while the command is still running - known as 'spawn mode'. Just take note of the tip in the Exec node's sidebar help:
Tip: if running a Python app you may need to use the -u parameter to stop the output being buffered.
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The 'Exec' node can be configured to output messages while the command is still running - known as 'spawn mode'. Just take note of the tip in the Exec node's sidebar help:
Tip: if running a Python app you may need to use the -u parameter to stop the output being buffered.
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
add a comment |
up vote
1
down vote
The 'Exec' node can be configured to output messages while the command is still running - known as 'spawn mode'. Just take note of the tip in the Exec node's sidebar help:
Tip: if running a Python app you may need to use the -u parameter to stop the output being buffered.
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
add a comment |
up vote
1
down vote
up vote
1
down vote
The 'Exec' node can be configured to output messages while the command is still running - known as 'spawn mode'. Just take note of the tip in the Exec node's sidebar help:
Tip: if running a Python app you may need to use the -u parameter to stop the output being buffered.
The 'Exec' node can be configured to output messages while the command is still running - known as 'spawn mode'. Just take note of the tip in the Exec node's sidebar help:
Tip: if running a Python app you may need to use the -u parameter to stop the output being buffered.
answered Nov 9 at 8:21
knolleary
6,41711528
6,41711528
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
add a comment |
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
Will that allow another instance to be run before the first finishes?
– Dom Gregori
Nov 9 at 12:03
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212798%2fin-node-red-how-to-execute-a-script-with-arguments-but-not-wait-for-completion%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown