As MSFT says, if possible (ie you have access to the server) then convert
your code to VBS (very easy to do as ASP is just VBScript in an ASP page so
you stick the code in a VBS file instead) and you schedule that VBS file to
run.
If you can't do that for whatever reason then there is something you can
kinda hack togther. Store in the Application object the date you want the
thing next run at and on the Session_onStart you check to see if it is after
this date. If it is you run your code and update the date;
sub Session_onStart
if Now > CDate(Application("NextRun")) then
Application.Lock
Application("NextRun") = DateAdd ("h", 1, Now)
Application.UnLock
' now your code to send out your e-mails
end if
end sub
Please note this is pseudo code, I may have the DateAdd stuff a bit wrong
but you get the idea. The downside is that your code runs only when someone
looks at your site after the sheduled time, and that person needs to wait a
while :) You could also put this code in a seperate file and INCLUDE it on
every page, or at least the major ones. That way it is checked every time
someone requests a page.
[quoted text, click to view] "Paul N" <pnelson@amylin.com> wrote in message
news:db6b01c3f030$1297f1b0$a301280a@phx.gbl...
> Hi there,
>
> My web app needs to run a schduled task - every hour it
> needs to scan the DB, find any updates and - if there are
> updates - send an email to an address list, notifyling
> them of the change.
>
> I know how to scan the DB for chnages, how to send and
> SMTP mail to an address list, and how to set this mail up
> such that it gives a simple link to the appropriate place
> in the web app - the only thing I lack experience in is
> setting up scheduled apps. This would have to be done on
> the server (Windows 2000).
>
> I am posting thios question to both the distributed apps
> and the servers newsgroups, as it may be appropriate for
> either.
>
> Thanks,
>
> Paul N