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.GetEnvi ronmentStr ing("SES_v ar")
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.
i created schedule agent schedule hourly and storing the values in agent using environmnet variables like
Call session.SetEnvironmentVar(
and to display the output in agent i am using
sessionvar=session.GetEnvi
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.
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.
:-)
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To show the runtime including time you could use the following line:
doc.LastRun=LastRun.LocalT ime
This will return a value like "13/02/2002 09:46 CET"
doc.LastRun=LastRun.LocalT
This will return a value like "13/02/2002 09:46 CET"
ASKER
Thank u very much.
saleem.
You're welcome. How have you been? Long time no see...
ASKER
hai jerrith,
i am sick.so thats why i am late.
sorry for delay.
saleem khan.
i am sick.so thats why i am late.
sorry for delay.
saleem khan.
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.
:-)