3 Replies - 1543 Views - Last Post: 22 May 2002 - 09:56 AM Rate Topic: -----

#1 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

automating web functions...

Posted 21 May 2002 - 09:35 AM

alright, here's what I need to do:

I'm going to have a database of job postings. Each posting will have an expiry date, which will be stored in the db (SQL Server). Somehow, I need to automate an email once the expiry date is approaching. I can't think of a way to automate that except by say adding a script to the front page which would check for upcoming expiry dates... that's kind of a messy way.

How can I automate an ASP email without necessarily calling a page? Can that be done on the server? does anyone know?


Is This A Good Question/Topic? 0
  • +

Replies To: automating web functions...

#2


Reputation: 0

Re: automating web functions...

Posted 21 May 2002 - 02:45 PM

Here are the three ways to make this happen that occured to me.  Each has it's advantages and disadvantages.  If you have root access to the server you can set up a scheduled task on a stored procedure through enterprise manager.  Even if you don't have root access your host may setup the scheduled task for you and then you can edit your stored procedure.  This is the most robust solution but requires root access.  SQL server also has a schedule jobs function and SQL mail capability and so the whole operation could be setup in SQL as opposed to ASP.  Again I think you need to have root access to configure the scheduler, but don't quote me.  Downside here is that there is probably much less help on the web on how to implement this.  Last recourse is the least robust but easiest to implement.  Include an ASP page in a page that gets hit every day, make a file that captures the date and if the todays date doesn't match run your ASP include that checks the database for listings nearing expiration and sends mail.  By checking the date you save time (date comparison is a very quick process) and prevent multiple mails.  You also might want to flag the accounts that have received the warning mail so you don't hit them every day for a week.  Downside of this method is you rely on the page being hit everyday.  Not a big deal if you run a short query to check if it's been run already today.

Hoopster

Was This Post Helpful? 0

#3 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

Re: automating web functions...

Posted 22 May 2002 - 08:55 AM

hm... yeah... the third one is the one I was trying to  avoid... the first one sounds the best but requires cooperation from IS... not a problem in theory but it sometimes takes longer than I like to wait... I think I'll go with the third one for now and see if I have time to fix it up later... :)
Was This Post Helpful? 0
  • +
  • -

#4 Cookie Mobster  Icon User is offline

  • nooneenooneenooonee
  • member icon

Reputation: 7
  • View blog
  • Posts: 4,730
  • Joined: 12-October 01

Re: automating web functions...

Posted 22 May 2002 - 09:56 AM

Just make your code reusable and in a format that you can just convert it directly over to the cron job and not have to rewrite it.

Cheers Sam

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1