Preface
People often hope that at a specific time, they can automatically perform certain operations, such as: electronic information, data library sorting, etc.
method
1. You can find the aspexe component to use
2. You can use WSH to process it. The following article is reprinted to a mainland website (I forgot to come out~)
WSH is basically the same as ASP’s writing method except
No need to add ASP delimiter
The file's subfile name is .vbs
Since it is not used, object mode without ASP is not suitable.
The servo side cannot be included, so some ADOs must be declared on their own
'Please don't use it
Set oConn = CreateObject("")
YourConnString
sSQL = "update AdInfo set AdStatus=0 " _
& "where ValidToDate<='" & Date & "'"
(sSQL)
Set oConn = Nothing
Save the file as c:, WSH has two versions, one is the window version (), and the other is the command column version (). In this example, we will use (), you can execute it under the DOS command column
c:>cscript c:
Then you can check whether the data is updated under Query Analyzer. In actual applications, it is recommended that you use this file to divide the work in different periods. For example, I will create a batch file called to perform all the daily routines. In this way, I just need to put all the scripts that should be executed every day into this batch file, and then use AT Command or SQL Server Agent to execute daily.
It is strongly recommended to use SQL Server Agent, which will be more efficient and stable than using AT Command! Setting up SQL Server Agent You can run Enterprise Manager, and you will see this picture after the expansion.
Click Jobs on the right mouse, choose New Job
Select Step Press New
Specify Step Name , Type Please select Operating System Command, and set the executed Command
Select Schedule to set your schedule
3. Use vbs program and under the WINDOWS automatic schedule, specify that IE start the ASP program you have written and completed.
People often hope that at a specific time, they can automatically perform certain operations, such as: electronic information, data library sorting, etc.
method
1. You can find the aspexe component to use
2. You can use WSH to process it. The following article is reprinted to a mainland website (I forgot to come out~)
WSH is basically the same as ASP’s writing method except
No need to add ASP delimiter
The file's subfile name is .vbs
Since it is not used, object mode without ASP is not suitable.
The servo side cannot be included, so some ADOs must be declared on their own
'Please don't use it
Set oConn = CreateObject("")
YourConnString
sSQL = "update AdInfo set AdStatus=0 " _
& "where ValidToDate<='" & Date & "'"
(sSQL)
Set oConn = Nothing
Save the file as c:, WSH has two versions, one is the window version (), and the other is the command column version (). In this example, we will use (), you can execute it under the DOS command column
c:>cscript c:
Then you can check whether the data is updated under Query Analyzer. In actual applications, it is recommended that you use this file to divide the work in different periods. For example, I will create a batch file called to perform all the daily routines. In this way, I just need to put all the scripts that should be executed every day into this batch file, and then use AT Command or SQL Server Agent to execute daily.
It is strongly recommended to use SQL Server Agent, which will be more efficient and stable than using AT Command! Setting up SQL Server Agent You can run Enterprise Manager, and you will see this picture after the expansion.
Click Jobs on the right mouse, choose New Job
Select Step Press New
Specify Step Name , Type Please select Operating System Command, and set the executed Command
Select Schedule to set your schedule
3. Use vbs program and under the WINDOWS automatic schedule, specify that IE start the ASP program you have written and completed.