Author |
Message |
Eugene
Joined: 29 Dec 2003 Posts: 11
|
|
24x7 /JOB Additional parameter |
|
Hello, Is there any way to execute 24x7 job from DOS, passing additional parameter(s). For Example: 24x7 /JOB We are using 24x7 version 3.2.1. Thanks in advance.
|
|
Mon Jan 31, 2005 4:57 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: 24x7 /JOB Additional parameter |
|
Sure, you can use environment variables. Batch file example: Set my_var1=5 Set my_var2=Hello there echo Now starting 24x7 job 24x7 /JOB [job] echo Done In 24x7 wherever needed use macro-variables for environment values, for example in a script type job MessageBox( "Got number from DOS => @V"env:my_var1"" ) MessageBox( "Got string from DOS => \"@V"env:my_var2"\"" ) PS. @V macros can be used in most places, command lines, scripts, file names, notifications actions, and so on : Hello, : Is there any way to execute 24x7 job from DOS, : passing additional parameter(s). : For Example: 24x7 /JOB : We are using 24x7 version 3.2.1. : Thanks in advance.
|
|
Mon Jan 31, 2005 5:22 pm |
|
 |
Eugene
Joined: 29 Dec 2003 Posts: 11
|
|
Re: 24x7 /JOB Additional parameter |
|
Unfortunately the following code cannotbe validated by 24x7 MessageBox( "Got number from DOS => @V"env:my_var1"" ) MessageBox( "Got string from DOS => \"@V"env:my_var2"\"" ) Any suggestions? Thanks : Sure, you can use environment variables. : Batch file example: Set my_var1=5 : Set my_var2=Hello there : echo Now starting 24x7 job : 24x7 /JOB [job] : echo Done : In 24x7 wherever needed use macro-variables for environment values, for : example in a script type job : MessageBox( "Got number from DOS => @V"env:my_var1"" ) : MessageBox( "Got string from DOS => : \"@V"env:my_var2"\"" ) : PS. @V macros can be used in most places, command lines, scripts, file names, : notifications actions, and so on
|
|
Mon Jan 31, 2005 6:26 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: 24x7 /JOB Additional parameter |
|
Did you change backslash as the default escape symbol in JAL scripts? I yeas in my code example replace backslashes with the symbol you picked. : Unfortunately the following code cannotbe validated by 24x7 : MessageBox( "Got number from DOS => @V"env:my_var1"" ) : MessageBox( "Got string from DOS => : \"@V"env:my_var2"\"" ) : Any suggestions? : Thanks
|
|
Mon Jan 31, 2005 7:24 pm |
|
 |
Eugene
Joined: 29 Dec 2003 Posts: 11
|
|
Re: 24x7 /JOB Additional parameter |
|
I did not change backslash and still use it as a escape symbol. It works fine in all other parts of code, but not for the one you provided: MessageBox( "Got number from DOS => @V"env:my_var1"" ) MessageBox( "Got string from DOS => \"@V"env:my_var2"\"" ) Any other suggestions? Thanks : Did you change backslash as the default escape symbol in JAL scripts? I yeas : in my code example replace backslashes with the symbol you picked.
|
|
Tue Feb 01, 2005 10:22 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: 24x7 /JOB Additional parameter |
|
You lost me. You said first you are having problems validating this script, now you are saying that it works "in all other parts of code", could you please explain in more details where you are trying this script (what part), where it works and where it doesn't? : I did not change backslash and still use it as a escape symbol. : It works fine in all other parts of code, but not for the one you provided: : MessageBox( "Got number from DOS => : @V"env:my_var1"" ) : MessageBox( "Got string from DOS => : \"@V"env:my_var2"\"" ) : Any other suggestions? : Thanks
|
|
Tue Feb 01, 2005 10:38 am |
|
 |
Eugene
Joined: 29 Dec 2003 Posts: 11
|
|
Re: 24x7 /JOB Additional parameter |
|
Sorry for missunderstanding. When you mentioned probability that backslash was changed as an default escape character, I mean to answer - I did not change backslash as a default escape character and backslash works fine as a escape character for me in some my code I have in 24x7. Now back to exampe you provided- seems like the code you provided has some other problem. 24x7 gives me an error for both following lines: MessageBox( "Got number from DOS => @V"env:my_var1"" ) MessageBox( "Got string from DOS => \"@V"env:my_var2"\"" ) Thanks again : You lost me. You said first you are having problems validating this script, : now you are saying that it works "in all other parts of code", : could you please explain in more details where you are trying this script : (what part), where it works and where it doesn't?
|
|
Tue Feb 01, 2005 10:51 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: 24x7 /JOB Additional parameter |
|
Do you have my_var1 and my_var2 environment variables defined? If yes, what are their values? If no, I still need more info, as I am unable to reproduce this problem. I assume you created a new script type job, selected JAL for the job language and pasted my example script. Right? By the way, which version of the scheduler are you running? : Sorry for missunderstanding. When you mentioned probability that backslash : was changed as an : default escape character, I mean to answer - I did not change backslash as a : default : escape character and backslash works fine as a escape character for me in : some my code I have in 24x7. : Now back to exampe you provided- seems like the code you provided has some : other problem. : 24x7 gives me an error for both following lines: MessageBox( "Got number : from DOS => @V"env:my_var1"" ) : MessageBox( "Got string from DOS => : \"@V"env:my_var2"\"" ) : Thanks again
|
|
Tue Feb 01, 2005 11:11 am |
|
 |
Eugene
Joined: 29 Dec 2003 Posts: 11
|
|
Re: 24x7 /JOB Additional parameter |
|
We are running 24x7 version 3.2.1 We built the following bat file: Set my_var1=1 Set my_var2=message2 echo Now starting 24x7 job "D:\24x7 Automation 3\24X7.EXE " /JOB 317 echo Done In 24x7 job 317 we have: MessageBox( "Got number from DOS => @V"env:my_var1"" ) MessageBox( "Got string from DOS => \"@V"env:my_var2"\"" ) but we cannot validate script syntax in 24x7. Thanks. : Do you have my_var1 and my_var2 environment variables defined? If yes, what : are their values? : If no, I still need more info, as I am unable to reproduce this problem. I : assume you created a new script type job, selected JAL for the job : language and pasted my example script. Right? : By the way, which version of the scheduler are you running?
|
|
Tue Feb 01, 2005 11:21 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: 24x7 /JOB Additional parameter |
|
Aha, your version doesn't support @V"env:" macros. Please upgrade to a more recent version. The upgrade is free and takes less then a minute to install. The most recent version is 3.4.24 : We are running 24x7 version 3.2.1 : We built the following bat file: Set my_var1=1 : Set my_var2=message2 : echo Now starting 24x7 job : "D:\24x7 Automation 3\24X7.EXE " /JOB 317 : echo Done : In 24x7 job 317 we have: MessageBox( "Got number from DOS => : @V"env:my_var1"" ) : MessageBox( "Got string from DOS => : \"@V"env:my_var2"\"" ) : but we cannot validate script syntax in 24x7. : Thanks.
|
|
Tue Feb 01, 2005 11:33 am |
|
 |
|