Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


nabsar
2009-10-13T20:08:21Z
Hi.
We are evaluating VisualCron. Our apps require use of common environment variables and app specific parameters. We want to be able to set the environment variables as part of the user profile. We haven't figured out how to use these environment variables within VisualCron. Another option would be to set user variables before each 'Execute Task' and use these variables as parameters. User variables can be set using the 'Set Variable' task, but that would be too many such tasks. The question is can these user variables be set in a file and have VisualCron read this file instead of having a whole bunch of 'Set Variable' tasks prior to each 'Execute' task? Ability to do so is crucial for us.
Thanks.
Sponsor
Forum information
Support
2009-10-14T14:49:47Z
We are about to develop a Task for this. Current Variable handling has nothing to do with environment Variables. What you can do is to create a batch file that you run from Execute Task to set those Variables.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-14T15:48:21Z
Thanks for your response. If I set an environment variable, CONNECTSTR, either in a batch file or in the user profile, how do I use CONNECTSTR in an 'Execute' task as a parameter?
Support
2009-10-14T15:57:51Z
In your case, I think it is better to use VisualCron variables. They are encrypted so you can just create a VisualCron user Variable. Then open the Variables browser and copy the Variable key to the parameter field.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-14T16:37:35Z
Yes, I have used user variables as parameters, and that is probably what we'll use for most of our parameters. But there are others that we'd like to set as environment variables. Could I run a batch task where I set an environment variable, say, LOGDIR, and in the following task use LOGDIR as a parameter? I tried to use it as "LOGDIR" but it didn't work. How would I use the env. variable in this case? Another question is, once an env. variable is set, can it be used in a task in another job stream?

Thank you for your help. I've been trying to resolve this issue for a while now without getting anywhere.
Support
2009-10-14T17:00:01Z
The question is what you want to do and why. There are so many ways to solve this. The only problem is that there is no exact relation between the ordinary context that VisualCron runs a process in (i.e. the Execute Task).

Right now I am only guessing how you would use it. But still, I am would say that Environment Variables are old style and that it is easier to create User Variables in VisualCron that can be passed anywhere to and from VisualCron.

Let say you create a VisualCron user Variable and then pass it in the Parameter field. Now you can pickup that Variable in your exe and use it in all other Tasks as well.

Is not that what you want?

After some tests I see that the problem with using Environment variables is that we do not currently load them (the ones that are User enviroment Variables). So, currently, you can only use VisualCron Variables. But I am not sure if that is a limitation for you?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-14T17:18:24Z
Yes, user variables can be used anywhere. The only problem I see is that we can have more than 10 variables that we need to execute our tasks. Some of these variables would change from task to task. Since we have to set each of these variables, separately in 'Set Variable' tasks, and some reset before each of the 'Execute' task, seems not ideal. Thats why I was asking if this could be done in a batch script as environment variables, or set the user variables in a text file. It seems none of these are possible at the moment.
Thanks for your help.
Support
2009-10-14T17:33:41Z
We will investigate what it takes to load environment variables.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-20T23:10:28Z
Hello.
Any feedback on this?
Thanks.
Support
2009-10-23T10:04:55Z
After some testing we found no easy solution. We are moving this post to Feature requests.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-23T16:01:31Z
Thanks. Yes, it would be helpful 1) to be able to set several user variables in one task, 2) use system variables set for a user when a user profile is being used, 3) use environment variables from within VisualCron. Currently my workaround is setting the environment variables in a batch script and calling this script from within other batch scripts because the environment variables are not retained from one Execute Task to the next.
Thank you.
Scroll to Top