IN node-red i want to create a flow which executes a command and if that command takes more than 15 minutes to give result it should kill itself or terminate itself

IN node-red i want to create a flow which executes a command and if that command takes more than 15 minutes to give result it should kill itself or terminate itself .

Do you mean using and Exec node?
If so, the Exec node has a Timeout field you can use to kill the process.

iam using that but it does not work properly, actually iam running a command to trigger spiderfoot tool scan over an ip-address or domain name .
when i do it in terminal only way to abort it is uding ctrl+c , but when i use timeout function the scan does'not get aborted and remains in the background.

What version of node-red and nodejs are you using (use node -v to get the nodejs version)?
Please show us how you have configured the Exec node. You can paste a screenshot here.

Also look in the node-red log to see if anything is logged when it should timeout.

nodejs version is 20 and node-red v3.1.3

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

[
{
"id": "37d7bbab936a0bab",
"type": "exec",
"z": "f2559bb7c755d703",
"command": "/usr/bin/python3 /home/ti/.node-red/spiderfoot/spiderfoot/sf.py -m sfp_bgpview -s 193.169.244.35 ",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "10",
"winHide": false,
"oldrc": false,
"name": "cmd",
"x": 370,
"y": 320,
"wires": [
[
"e860741d902d48b0"
],
[
"fcabbe0fc89b6b48"
],
[
"f3d631ef31777492"
]
]
},
{
"id": "46ec38b4b29524dc",
"type": "inject",
"z": "f2559bb7c755d703",
"name": "",
"props": [
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 230,
"y": 320,
"wires": [
[
"37d7bbab936a0bab"
]
]
},
{
"id": "e860741d902d48b0",
"type": "debug",
"z": "f2559bb7c755d703",
"name": "debug 68",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 480,
"y": 240,
"wires": 
},
{
"id": "fcabbe0fc89b6b48",
"type": "debug",
"z": "f2559bb7c755d703",
"name": "debug 69",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 540,
"y": 300,
"wires": 
},
{
"id": "f3d631ef31777492",
"type": "debug",
"z": "f2559bb7c755d703",
"name": "debug 70",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 540,
"y": 340,
"wires": 
}
]


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.