|
Posted by mmccaws2 on April 2, 2008, 3:12 pm
Please log in for more thread options > On Apr 2, 9:22 am, jjcass...@gmail.com wrote:
>
>
>
>
> > > I have a user interface script that makes changes in a db or makes db
> > > queries. I don't want the user to just leave the script running all
> > > the time. what is the best way to monitor if the script has had no
> > > actiivty for 20 minutes?
>
> > > Thanks
>
> > > Mike
>
> > You'd need to use *some kind* of persistence. Cheapest NIX-ish way is
> > to have a dummy file that you "touch" when you exit the program--or
> > whenever a significant event occurs, if you occasionally "sleep". If
> > you "stat" the file, you know how long it's been since it's been
> > "touch-ed".
>
> > Other than that, it's your choice of persistence: write and read time
> > to and from a file; use Storable or YAML to dump a hash with all the
> > values you care about; use a database....
>
> so everytime enter is hit log it and have the same script check that
> or a different script monitor it? I'm not familiar with storable or
> yaml, what keyword search would I use to help narrow down the choices?
>
> Thanks
>
> Mike
Mark
our posts crossed, I'll try that
Mike
|