[Last Call] Learn how to a build a cloud-first strategyRegister Now


ASP Task Scedule Windows 2003 Server

Posted on 2009-12-17
Medium Priority
Last Modified: 2012-05-08
Hello Experts,

I have an ASP VBScript page, that basically calls a number of MS SQL Stored Procedures, and an ASP function and actions the following -

Selects recepients
Emails recipients
Flags that notification has been sent
copies any expired data to an expired data table
deletes the expired data from the live table...

the ASP page isn't specific to any particular website as it runs the processes above in one batch for all websites on the server.

I really want to be able to use task sceduler to execute the asp scripts on a daily basis..

Any thoughts on this would be great?

Thank you
<!--#include file="../Connections/recruta2.asp" -->

set JBNotify = Server.CreateObject("ADODB.Command")
JBNotify.ActiveConnection = MM_recruta2_STRING
JBNotify.CommandText = "dbo.jobboardExpiryNotificationRecipients"
JBNotify.CommandType = 4
JBNotify.CommandTimeout = 0
JBNotify.Prepared = true
JBNotify.Parameters.Append JBNotify.CreateParameter("@RETURN_VALUE", 3, 4)
set Recepients = JBNotify.Execute
Recepients_numRows = 0

if not Recepients.eof then
do while not Recepients.eof
Set myMail=CreateObject("CDO.Message")
URLLong= (Recepients("JBSURL")) & "/coms/em/aemail.asp?ID=" & Recepients("JBEID")
myMail.Subject= "You have jobs on " & URLShort & " that expire today"
myMail.From= ReplyMail
myMail.To= ""& Recepients("JBEUsername")&"; "
myMail.CreateMHTMLBody URLLong
set myMail=nothing
Set Recepients = nothing 
end if

set ExpirySent = Server.CreateObject("ADODB.Command")
ExpirySent.ActiveConnection = MM_recruta2_STRING
ExpirySent.CommandText = "dbo.jobboardExpiryNotificationSent"
ExpirySent.CommandType = 4
ExpirySent.CommandTimeout = 0
ExpirySent.Prepared = true
ExpirySent.Parameters.Append ExpirySent.CreateParameter("@RETURN_VALUE", 3, 4)


set Copyadverts = Server.CreateObject("ADODB.Command")
Copyadverts.ActiveConnection = MM_recruta2_STRING
Copyadverts.CommandText = "dbo.JobboardMoveExpiredAdvertsStage1"
Copyadverts.CommandType = 4
Copyadverts.CommandTimeout = 0
Copyadverts.Prepared = true
Copyadverts.Parameters.Append Copyadverts.CreateParameter("@RETURN_VALUE", 3, 4)


set DeleteAdverts = Server.CreateObject("ADODB.Command")
DeleteAdverts.ActiveConnection = MM_recruta2_STRING
DeleteAdverts.CommandText = "dbo.JobboardMoveExpiredAdvertsStage2"
DeleteAdverts.CommandType = 4
DeleteAdverts.CommandTimeout = 0
DeleteAdverts.Prepared = true
DeleteAdverts.Parameters.Append DeleteAdverts.CreateParameter("@RETURN_VALUE", 3, 4)

<% Response.Redirect"mailsent.asp" %>

Open in new window

Question by:garethtnash
LVL 13

Accepted Solution

samic400 earned 1000 total points
ID: 26072840
We do this stuff quite a bit - follow this tutorial and just point to the page you want to run - http://www.iopus.com/guides/winscheduler.htm
LVL 12

Assisted Solution

by:Ashley Bryant
Ashley Bryant earned 1000 total points
ID: 26072870
Have you tried using cURL?

Author Closing Comment

ID: 31667269
thank you

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

826 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question