Advertisement

09.13.2007 at 10:55AM PDT, ID: 22826977
[x]
Attachment Details

How can i make delay time in my VB code?

Asked by euno73 in VB Script, Visual Basic Programming, Web Servers

Tags: delay, vb, time

I have a very simple VB code..But i need that working 'Mail.vbs' after 2min..

'-----------start-------------------------------------------------------------------------
Set objShell = CreateObject("Wscript.Shell")

YY=Mid(Year(Now),3)
M=Month(Now)
D=Day(Now)
H=Hour(Now)

If M < 10 Then
   MM = "0"&Month(Now)
Else
   MM = Month(Now)
 End If
 
 If D < 10 Then
   DD = "0"&Day(Now)-1
Else
   DD = Day(Now)-1
 End If

 If H < 10 Then
   HH = "0"&Hour(Now)
Else
   HH = Hour(Now)
 End If
 
Preday= YY&""&MM&""&DD

'WScript.echo Preday

objCommand = "LogParser ""Select [Date],[time],[cs-uri-stem],[cs-uri-query],[sc-status] into "&Preday&"_500error.log  From C:\Winnt\system32\Logfiles\W3SVC6\ex"&Preday&"*.log  where Sc-status=500  order by [Date] DESC"" -rtp:-1 -i:iisw3c"
objShell.Run(objCommand)

'-------------------------------------------------------------------------------------------------------------
This here, how can i make 2min sleep or delay?
Could you help me?
'-------------------------------------------------------------------------------------------------------------

Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.Run "C:\LogParser2.2\Mail.vbs"

Set oShell = nothing
Set objShell = nothing  
'----------------------------------------- End ---------------------------------------------------------------Start Free Trial
[+][-]09.13.2007 at 10:57AM PDT, ID: 19885744

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2007 at 11:04AM PDT, ID: 19885783

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Visual Basic Programming, Web Servers
Tags: delay, vb, time
Sign Up Now!
Solution Provided By: hes
Participating Experts: 3
Solution Grade: B
 
 
[+][-]09.13.2007 at 03:14PM PDT, ID: 19887493

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628