Is there any documentation on the “execute” function?
I would like to write my own functions for data sources, but can’t find any documentation on this function.
Is there any documentation on the “execute” function?
I would like to write my own functions for data sources, but can’t find any documentation on this function.
Ive been using it to execute batch files and programs in the dudes data directory i have no idea if this is the intended purpose. ![]()
Hi VTWifiGuy, do you have any examples that you could share with me?
if your executing on the server you have to type in the absolute path of whatever you are doing and if i recall it will execute from the root directory i could be wrong there. So i have batch files i uploaded remotely and i have a notification that executes on server c:\progra~1\dude\data\files\test.bat
So what is the syntax for the execute command?
as i said i am sure im not using this feature correctly. I set up a notification of type ‘execute on server’ and in the white box i put in ‘msdos based command i want’
anyone?
Hi,
I’m using DudeV2.2 and created some execute-functions. The following one for example returns Array-Index 0 (array_element → Return Code) of the returned values of executing program.exe, parameters passed to the .exe, and where the .exe resides (Path). I think this should work with a .bat anyway…
→ array_element(execute(“check_nrpe.exe”, concatenate("-n -t 10 -c nt_check_disk_c -H ", device_property(“FirstAddress”)), “D:\Programme\cygwin”), 0)
And here the syntax description given from Mikrotik:
“executes program, returns array of three elements - return code, standard output, standard error. return code is -1 if error occurs. Only first parameter mandatory. First paramerter - command, second - parameters, third - path, forth - input string to pass to program, fifth - timeout in seconds (default 5.0)”
Hope this is what you need…