 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
Define common paths/e-mails? |
|
I'm going to be defining 100+ jobs. Every job is going to have both the same path in the command line and be e-mailing the same user on errors.
e.g. the command line reads:
sasbatch xxx\blah blah blah
where 'xxx' is identical across all the jobs.
Is there a way to define this information in a single place?
Thanks.
24x7 Scheduler 3.4.27
|
|
Sat Aug 11, 2007 3:49 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Here are your choices:
1. You can use macro-parameters in job properties to refer to system environment variables. For details see macro-parameters section in the on-line help
2. You can use script jobs and global variables with a single job running on 24x7 and defining all values and other jobs using these values
3. You can create a template and use to create jobs, automatically copying the required values (of course if you change the template later, jobs are not going to change until you update them), or you can create a the first job and when creating other copy that job properties using "create from another job" option.
4. You can create simple script jobs that read settings from the registry, database or some configuration file.
|
|
Sat Aug 11, 2007 12:59 pm |
|
 |
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
|
|
 |
 |
2. You can use script jobs and global variables with a single job running on 24x7 and defining all values and other jobs using these values |
Thanks for the pointers, option 2 sounds like me.
So I would need to create a JAL job which defines my global variables (path and e-mail address), then run the job once only?
And I could then enter these global variables in the Job Wizard and they'd be picked up at runtime?
|
|
Sat Aug 11, 2007 5:32 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Please don't confuse global variables and macro-parameters. These are totally different things. Macro-parameters are sort of substitution values that can be used in many job properties, while global variables can be used in scripts only, but have global scope, meaning that they are accessible from different jobs.
You may want to read "Macro-parameters" and "Global variables" in the on-line help to understand better how the proposed solutions could be used.
|
|
Mon Aug 13, 2007 8:06 am |
|
 |
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
|
|
Gotcha, thanks.
By the time I'd defined a Windows environment variable it was easier to use it directly in the command line rather than accessing through a macro variable.
e.g. I'm using
%HSProgs%
rather than
@V"env:[HSProgs]"
Cheers
|
|
Tue Aug 14, 2007 1:41 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Just in case, it should be @V"env:HSProgs" instead of @V"env:[HSProgs]" and this macro could be used in many job properties, while the system environment variables can be used in command lines only.
Hope this helps.
|
|
Tue Aug 14, 2007 1:57 am |
|
 |
|
|
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
|
|
|