Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Query database daily automatically

New Here ,
Sep 02, 2008 Sep 02, 2008
I have a database (MSAccess) that users can access and add records. Individual pages are in ASP and everything is working well.

What I want to do now is to query the database once a day, automatically, to look for changes based on a particular date field. I haven't a clue if it is even possible to automatically open and run an ASP page unattended. Not even sure if I'm asking the right question in the correct forum (sorry if I'm not!)

Anyone help? Thanks in advance.

Jerry
TOPICS
Server side applications
389
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 03, 2008 Sep 03, 2008

"jwcrosby" <webforumsuser@macromedia.com> wrote in message
news:g9keop$c14$1@forums.macromedia.com...
>I have a database (MSAccess) that users can access and add records.
>Individual
> pages are in ASP and everything is working well.
>
> What I want to do now is to query the database once a day, automatically,
> to
> look for changes based on a particular date field. I haven't a clue if it
> is
> even possible to automatically open and run an ASP page unattended. Not
> even
> sure if I'm asking the right question in the correct forum (sorry if I'm
> not!)
>

Maybe it's just me, but I think you need to think this through a bit more.
Why do you need this query to "run an asp page unattended"? It's not going
to show the data to you until you go and visit the page anyway, right? So
why have it "run unattended" instead of just having the page display the
changes you're looking for?


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2008 Sep 03, 2008
Some additional information will be helpful...The database allows users to post dated announcements. When posting they enter an begin post date and an end post date. When a new entry is written to the database, it looks at the begin post date and if it is today's date, it sends an email announcement to everyone in the group. (It's basically a notification that a new announcement has been posted.)

However, if someone enters an announcement with a future post date, no email notification is ever sent, since it's programed to only check the post date upon submission (comparing it to that day's date). I'd like a routine that once every day queries the database looking for post dates that match that day's date and then sends out an email notification.

Did that clarify it any?

Jerry Text
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 03, 2008 Sep 03, 2008
jwcrosby posted in macromedia.dreamweaver.appdev:

> However, if someone enters an announcement with a future post
> date, no email
> notification is ever sent, since it's programed to only check the
> post date upon submission (comparing it to that day's date). I'd
> like a routine that once every day queries the database looking
> for post dates that match that day's date and then sends out an
> email notification.
>
> Did that clarify it any?

You'll need to set up a cron job with a script that does the above. I
forgot what it's called if you're using a Windows server, Task
Scheduler?



--
Mark A. Boyd
Keep-On-Learnin' :)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 04, 2008 Sep 04, 2008
LATEST
Mark A. Boyd wrote:
> jwcrosby posted in macromedia.dreamweaver.appdev:
>
>> However, if someone enters an announcement with a future post
>> date, no email
>> notification is ever sent, since it's programed to only check the
>> post date upon submission (comparing it to that day's date). I'd
>> like a routine that once every day queries the database looking
>> for post dates that match that day's date and then sends out an
>> email notification.
>>
>> Did that clarify it any?
>
> You'll need to set up a cron job with a script that does the above. I
> forgot what it's called if you're using a Windows server, Task
> Scheduler?

If you are using MS SQL you can program a Job to do this for you. I use
SQL jobs internally for all sorts of things, including emails.

Dooza
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines