It seems that both macros and compiled Exe´s do not support a very common and basic function for programs: exit codes or return codes
(see also http://en.wikipedia.org/wiki/Exit_code or http://www.itworld.com/Comp/1375/nls_un ... index.html)
It would be a very important enhancement for Macro Scheduler, because some basic technologies use this basic function.
For instance:
I want to use macros or compiled Exe´s to check the function of any application from a users view as a part of a complex system monitoring solution based on nagios (http://www.nagios.org). With the help of nrpe_nt (http://www.miwi-dv.com/nrpent/) it´s possible to start scripts or executables on remote windows workstations. nagios/nrpe_nt use exit codes to transfer results (status information: ok, warning, critical) to the nagios process. If Macro Scheduler would support exit codes I could use it for enterprise application monitoring. I´m sure, that this is a very interesting use of Macro Scheduler for many other people, too.
Support of exit codes
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The Run Program command does support exit codes. The exit code is put in the RP_RESULT variable.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
O.k.
I understand that macros can "read" exit codes, that are returned by programs, that were started by the macro.
What I need is following: I want to start a created macro or a compiled Exe from another program or script. That program or script expects, that the called program returns a specific exit code. Macros an compiled Exe´s created by Macro scheduler schould return exit codes to calling programs.
I understand that macros can "read" exit codes, that are returned by programs, that were started by the macro.
What I need is following: I want to start a created macro or a compiled Exe from another program or script. That program or script expects, that the called program returns a specific exit code. Macros an compiled Exe´s created by Macro scheduler schould return exit codes to calling programs.
Ok, I maybe I'm missing something, but having written a fair amount of code.....Sounds like you want you Macro or EXE to just work like a self-contained function. So, in that case, WRITE it that way. There are endless ways to send data program to program.
Have the macro written to accept certain vars, or even have it run differently based on WHICH vars are sent to the macro, then have it write results to an intermediate file like a database, text file, etc....from this intermediate location have your program read the results...
I understand that this is just an enhancement suggestion, but if you could post a specific problem you are trying to solve, this forum can almost always find a solution.
Have the macro written to accept certain vars, or even have it run differently based on WHICH vars are sent to the macro, then have it write results to an intermediate file like a database, text file, etc....from this intermediate location have your program read the results...
I understand that this is just an enhancement suggestion, but if you could post a specific problem you are trying to solve, this forum can almost always find a solution.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Don't forget you can also have a macro return results to the calling macro with the MACRO_RESULT variable.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?