Link to home
Start Free TrialLog in
Avatar of saleemkhan
saleemkhan

asked on

problem with schedule agnet and storing values in files

hai experts,
   
      i created schedule agent schedule hourly and storing the values in agent using environmnet variables like

  Call session.SetEnvironmentVar("SES_var",varname)    
 
  and to display the output in agent i am using

sessionvar=session.GetEnvironmentString("SES_var")

Its working fine.
   But the main problem is when the schedule agent is running
   when i try to access the session variables it will display the session variable until and unless the  schedule agent is run successfully(completed) .
          so to avoid the delay which is the best solution.Waiting for experts solution and experts hint.

     i thought of storing all the session  variables in files and every hour the file should be updated.

    i dont know how to store all the session variables in files and update the session variables values and depending on the users roles i want to display the output from the files
         or is there anyway to achieve this task.


if there is any solution better than this suggest me.

saleem.
Avatar of Arunkumar
Arunkumar

Did you try profile documents instead of environment variables ?

Or a separate set of documents instead of files that can be updated everytime the agent runs?

This method is more efficient since you have a separate document for each time the agent running and you could take reports right from the view itself.

:-)
Even in this cases, the document have to be saved first before you could get its values for someother processing.

If you can let us know the exact purpose on why you need the values while the agent is running we could give you better alternatives.

:-)
I was thinking along the same lines.
Keep the values for variables in a profile or regular document and save this document at the end of the agent.

At the start of the agent, perform a lookup of the document and assign the new values to the document when you find one, or create a new document if no document exists.
ASKER CERTIFIED SOLUTION
Avatar of Jean Marie Geeraerts
Jean Marie Geeraerts
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To show the runtime including time you could use the following line:

doc.LastRun=LastRun.LocalTime

This will return a value like "13/02/2002 09:46 CET"
Avatar of saleemkhan

ASKER



Thank u very much.

saleem.
   
You're welcome. How have you been? Long time no see...
hai jerrith,
    i am sick.so thats why i am late.



sorry for delay.

saleem khan.