Re: Setting up a Timer in an ActiveX DLL
- From: "Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 Jan 2006 17:15:37 -0000
Just a normal EXE Seon
Check out the Windows Task Scheduler:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/evaluate/featfunc/taskschd.mspx
I'm sure I've seen references in these VB newsgroups so someone having
developed a neat VB class to programmatically use the scheduler, but I
haven't used it myself.
Tony Proctor
"news.microsoft.com" <seon@xxxxxxxxxxxxxx> wrote in message
news:#dlPenJFGHA.3920@xxxxxxxxxxxxxxxxxxxxxxx
> Thanks for helping me out with this Tony :)
>
> Ok, am happy to split the fuctionality.. no probs there... But, can you
> have a VP EXE that has no interface that just runs in the background, once
> installed, to just trigger off a timer like that? Obviously, if its an
EXE
> that a use launches, with an interface and all, no probs, but I didnt know
> you could do that with an Interface-Less EXE...
>
> Do I just use an ActiveX Exe? Or just a plain Exe?
>
> Seon Rozenblum
> Sector3
> Melbourne, Australia
> http://www.sector3.com.au
>
> --
>
> Seon Rozenblum
> Sector3
> Melbourne, Australia
> http://www.sector3.com.au
>
>
> "Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
> news:uXoPXR3EGHA.208@xxxxxxxxxxxxxxxxxxxxxxx
> > Sounds like you need to think about logically separating the data
> > processing
> > (i.e. the collation/extraction of data from logs) from the actual user
> > viewing of that data Seon. Unless I'm misunderstanding something, the
data
> > processing has to occur just once each day, and before anyone looks at
the
> > stats.
> >
> > This cannot be done on a timer inside IIS because ASP executes in the
> > context of a user request, or more specifically an 'ASP Session'. It
can't
> > just wake up outside of such a context and do something useful. Also,
it's
> > bad practice to try and persist objects between HTTP requests, say in
the
> > Session variables.
> >
> > This leaves two choices: 1) a separate EXE that wakes up at the
> > appropriate
> > time and does the data processing itself, or sends an HTTP request to
your
> > IIS server to achieve it via your ASP code. Alternatively, 2) trigger
the
> > data processing when the first user attempts to view the stats during
the
> > day (i.e. no timer at all). You have to be a bit careful in this 2nd
case
> > as
> > there could be multiple users trying to view the stats at the same time,
> > and
> > your DLL would be executing on multiple threads within IIS.
> >
> > Tony Proctor
> >
> > "Seon" <Seon@News> wrote in message
> > news:umxyUA0EGHA.3064@xxxxxxxxxxxxxxxxxxxxxxx
> >>
> >>
> >>
> >> Ok, let me start again, and explain what I am doing...
> >>
> >> I am writing a WebStats App... for my web server, and I will also be
> >> packaging it up and selling it.
> >>
> >> Right now, my DLL really does nothing at all that requires it to run
> >> under IIS... all it does right now is extract/collate data from the
> >> logs, and write specific thinmgs into an access database, via
> >> ADODB/ODBC...
> >>
> >> Eventually, it will also handle login/domain access via ASP, and I will
> >> also encapsulate a lot of the back end code for the Stats DHTML
> >> generation within it to prevent clients from playing with/breaking the
> >> package.
> >>
> >> basically, I just want my DLL triggered every morning to collate the
> >> previous dayus logs form all domains being tracked.
> >>
> >> It all works fine now, apart from the auto running of itself every
> >> morning.
> >>
> >> So... Can an EXE be used instead of the DLL? Can I still access my
> >> classes the same way (Via ASP), and if so, can the EXE have a timer on
a
> >> form (that never gets seen) run this way under IIS?
> >>
> >> Though I am a very capable web developer, and have no dramas with
> >> VBScript/JavaScript/ASP, and have written COM DLL's for IIS before as
> >> basic wrappers for other DLLs, I have never written something like this
> >> that has to automate itself.
> >>
> >> I dont want it running under windows schedule as it is something that
> >> needs to be self sufficient, as it will be a product I will be selling,
> >> and I want the installation to be quick and simple, and the package to
> >> work in the simplest way possible.
> >>
> >> I hope this clarifies things a bit...
> >>
> >>
> >> *** Sent via Developersdex http://www.developersdex.com ***
> >
> >
>
>
.
- Follow-Ups:
- Re: Setting up a Timer in an ActiveX DLL
- From: Wendell Buckner
- Re: Setting up a Timer in an ActiveX DLL
- References:
- Re: Setting up a Timer in an ActiveX DLL
- From: Tony Proctor
- Re: Setting up a Timer in an ActiveX DLL
- From: Seon
- Re: Setting up a Timer in an ActiveX DLL
- From: Tony Proctor
- Re: Setting up a Timer in an ActiveX DLL
- From: news.microsoft.com
- Re: Setting up a Timer in an ActiveX DLL
- Prev by Date: Re: Performance Tips
- Next by Date: Paul
- Previous by thread: Re: Setting up a Timer in an ActiveX DLL
- Next by thread: Re: Setting up a Timer in an ActiveX DLL
- Index(es):
Relevant Pages
|