Community forum

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-09-29T21:16:21Z
Hi.
I am very new to VisualCron. For my jobs I need to set up environment variables which can be used in all my jobs. I am trying to use environment variables and VisualCron user variables in my task. I am not having any success in either case.
1. I set up an environment variable, MYRUNDIR. I want the working dir in my task to be the value in MYRUNDIR. How can I use this env. variable?
2. I also tried to use a user variable for this. I set up a variable, MYDIR, with a value, 'c:\myapps'. In the working directory, I put, {USERVAR(MYDIR)}. When I run the job, I get an '..invalid directory' error.
thank you.
Sponsor
Forum information
Support
2009-10-05T18:27:03Z
If you use Windows environment Variables they are separate for each user. You should use the VisualCron user Variables instead.

In your case, when using that, it seems like you have missed a slash between folder path and file. You can always test the Variable by writing it to a file or copy full Variable to the Variable window.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-05T19:41:21Z
Hi.
Thank you for your response. I did get user variables to work. But we'd prefer to use environment variables. All our jobs will be executed using one credential. How can I use environment variables for my working dir, run dir, connection (user/pwd) etc?

Thank you.
Najma
Support
2009-10-05T22:02:54Z
We will add support for adding this for the SYSTEM user (which VisualCron runs as). Meanwhile you can set the Variables by just creating a batch file which you run from VisualCron.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
nabsar
2009-10-05T23:12:51Z
The document says, "Environment variables are loaded when you load a user profile. If you want to
access those you need to specify a Credential in an Execute Task and then select option Load profile". I created a credential for the user that the Task will run under. I created some env. variables for this user in user profile (not by running a .bat file). I'd like to use these variables in my Task. How can I refer to the environment variables from within a Task? Sorry to keep at it but I am evaluating the software for our use and use of environment variables is very important for us. Thank you.
Scroll to Top