Preface
It is often hoped that at a specific time, a certain ASP program can be activated for a specific job, such as sending e-mails and sorting data.
Method
1. You can use the aspexe component.
2. You can use wsh to handle the problem. BelowArticleYes. I have already forgotten the website ~)
Wsh is basically the same as ASP's scheme method
No ASP separator added
The sub-region name of the saved Shard is. vbs.
Because ASP. dll is not used, no ASP object mode is available.
Cannot Use servo terminals, so some ADO constants need to be declared on their own
'Do not use server. Createobject
Set oconn = Createobject ("ADODB. Connection ")
Oconn. Open yourconnstring
Ssql = "Update adinfo set adstatus = 0 "_
& "Where validtodate <= '" & Date &"'"
Oconn. Execute (ssql)
Oconn. Close
Set oconn = nothing
Save the statement as C: scriptsupdateadstatus. vbs and wsh have two versions: Windows (wscript.exe) and command column (cscript.exe). In this example, we will use (cscript.exe ), you can perform the following operations in the DOS command column:
C:> cscript C: scriptsupdateadstatus. vbs
Then, you can go to query analyzer to check whether the metadata is updated. In actual application, we suggest that you use batch of jobs in different time periods, for example, I will create a task named dailytask. bat batch uploads all the daily routine work. In this way, I only need to put all the scripts for daily response in this batch, then use at command or SQL Server Agent to initiate daily dailytask. bat
We strongly recommend that you use the SQL Server Agent, which is more efficient and variable than using the AT command! Set the SQL Server Agent. You can click Enterprise Manager to view the interface after development.
Click "Jobs" on the right and select "new job ".
Select worker step and press new
Specify the step name and type, select operating system command, and set the command of the operation row.
Select schedule to set your schedule
3. Use the vbs program and specify the ASP program that has been compiled by IE in the Windows automatic schedule.