Page 1 of 1

EXPORT

Posted: Thu Sep 07, 2000 12:29 pm
by Thunderstone


I have tried using the export function to no avail. I have a function that
modifies $myvar each time TEXIS is invoked, but it seems to get initialized
to zero every time instead of assuming the exported value. Is there
something special you have to do to make exported variables work?

<EXPORT $myvar QUERY USEROK>


-------------------------------------------------------
Travis Kerzic





EXPORT

Posted: Thu Sep 07, 2000 12:37 pm
by Thunderstone


http://www.thunderstone.com/vortexman/node32.html
says
.. Variables EXPORTed with the QUERY flag are saved to $urlq ...

So you have to print $urlq for them to actually get exported to the
next invocation.

Something like
<a href="$url/$urlq">...
or
<a href="$url/somefunc.html$urlq">...

Using any export type but QUERY will handle it fully automatically.





EXPORT

Posted: Mon Jul 31, 2006 2:25 am
by Texis User
Hi,

How do you maintain state of a variable across scripts that are not invoke through web , but scheduled to run after 5 mins.

Also I have a script, that I have made it to run in infinite loop i.e. while(true).
This is scheduled to run every 30 mins.
When invoked it reads runlog gets the pid of last run/current running script. If there is some script running it exits.

Now inside this script I invoke submethods as seperate processes using <switch>.
I wanna keep track of these subprocesses i.e. only max_process can run at a time.

Since ps -ef |grep "string" doesnot work uing <exec nobr... I decided to have a variables that hold the count at anytime.

When a subprocess finishes it subtracts one and when starts add one.

I want these variables exported/ available for each subprocess and only one suprocess can edit the value.

Continuing forward I let the subprocess sleep if the count exceeds.

Any suggestions?

Thanks.

EXPORT

Posted: Mon Jul 31, 2006 10:04 am
by John
For both cases it sounds as if a table is the right way to do it, storing the values. You can use SQL to update and query, e.g.

<SQL "update subproc set num = num+1"></SQL>

and for the other variables:

<SQL ROW "select Name, Value from vars">
<setvar $Name $Value>
</SQL>