SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
24x7 /JOB Additional parameter

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
24x7 /JOB Additional parameter
Author Message
Eugene



Joined: 29 Dec 2003
Posts: 11

Post 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
Eugene



Joined: 29 Dec 2003
Posts: 11

Post Re: 24x7 /JOB Additional parameter Reply with quote


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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
Eugene



Joined: 29 Dec 2003
Posts: 11

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
Eugene



Joined: 29 Dec 2003
Posts: 11

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
Eugene



Joined: 29 Dec 2003
Posts: 11

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: 24x7 /JOB Additional parameter Reply with quote

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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.