Delay, Sleep For 8 Seconds

What is the best way to do an ASP/sleep for 8 seconds (pause script for 8 seconds)? I have tried the following:

EndTime = Now() + (8 / (24 * 60* 60)) '8 seconds
Do While Now() < EndTime
'Do nothing
Loop

But unfortunately that keeps the CPU at 100% for that time. I need something that doesn't impact the CPU, as this delay will be in a while loop that will execute continuously for a few days.

View Replies


ADVERTISEMENT

Delay / Sleep

How to put a server side delay using VBScript

View Replies View Related

Is There In ASP Any Equivalent To Sleep() Function In PHP?!

Like this one:
http://www.php.net/sleep

If not how can I sleep?!

Thank you...

View Replies View Related

ASP Classic: Sleep Method

i must confess I have only ever done one website in ASP (classic), and a crude one at that too. So please forgive my stupidity that I'm about to throw at you. Anyways, I have been told to fix some ASP code (developer already left the company) - the code in question contains an ungodly amount of database selects/inserts/updates in while loops, and every time the script is run it bogs down the server (sometimes crashing the server too!).

So I was thinking maybe a quick way around this is to put in some sort of "sleep" calls during the execution of the script... though I don't know the syntax for it or even if such a method/function exists in ASP classic.

View Replies View Related

Delay In ASP

Here's a question for you....probably a simple answer but I can't find
it....I have an ASP results page that is going to display test, tables, etc.
What I would like to do is to have some kind of delay between the pieces
that write on the page....in other words:

Response.write("Something Here")
Response.write("<BR>")

*** then the wait function (maybe 2 seconds)

Response.write("Next Piece")
Response.write("<BR>")

View Replies View Related

Delay Affect In ASP

I have a page that allows a user to add a message for another user. They click the send message button, and then I would like to have a new page display that says the message has successfully been sent and then wait for around 5 seconds and then automatically take them to the next page. Is there ASP code that adds a delay or do I just need to code a loop that runs but does nothing?

View Replies View Related

Delay A Post

Can anyone help me how to delay a post in ASP.
Say i input a text in a form and click submit.

I like give the user to post the message immediately or after a specific time
Can i do this ASP

View Replies View Related

Redirect After Delay

I have an asp page that calls a "sendmail.asp" page which displays something like "thank you for your request". I want the "sendmail.asp" to show for 3-5 seconds and then redirect back to the index.htm page.

I have put in a while loop in the "sendmail.asp" page; it waits and then redirects but it doesn't show the "sendmail.asp" page at all.
You can see in the task bar that its doing something, but redirects directly to the index.htm page.

View Replies View Related

Putting A Delay Into A Loop ?

I have an application which loops through several thousand subscriber
records, compares each subscriber's requirements to a database of
businesses for sale, and then prepares and mails off an email
containing info from the database that the client is interested in.

Problem is that the ASP file exits as soon as it has sent about 50 or
so records to the Mercury/32 mail server on the local Ethernet. No
error message or program execution issues noticed. I then delete the
first 100 or so subscriber records and set the file off again. In the
loop thru the next 100 subscribers it prepares an email for approx
every second subscriber, then seems to hit this 50 max limit and
terminates again. Driving me crazy.

I figure that somewhere there's a queue building up which maxes
something out and causes some low level termination. To test that,
I'd like to build something into the loop thru the subscriber file
that causes a delay of 10 seconds or so before the loop starts again.

Code:

View Replies View Related

Delay Response.redirect

Is there a method to make response.redirct delay for say 5 seconds.

View Replies View Related

Delay Function On A Webform

I'm trying to do a registration page with CC information. I created my registration on an unsecure server and want to redirect the user to my secure server after they register so they can put in their CC info.

How can I make an interim page that says "Thanks for your registration, now redirecting you to secure page" What kind of function should I use to delay the redirection for 5 seconds or so. I'm running ASP.net with vb.net backend.

View Replies View Related

Session Variable Causing A Delay

I have a project that uses a frameset. On the pageload event one frame calls
an ASP.Net page that watches a message queue. The other frame has a page
that allows a user to submit queries. Through research I've discovered that
IE allows only two connections to IIS from any one client at a time. This is
okay since at any given time I can only have the AJAX thread and a page
request.

I noticed a problem today. If I introduce a session variable in any of my
server side code it causes every request to lock for 90 seconds before a
response comes back. After studying this behavior I am stumped. Is there an
extra thread being fired whenever session is used?

View Replies View Related

Why Is There A Delay When I Browse To My First Aspx Page?

I have a IIS server somewhere hosting an aspx website. Whenever i tried
to access the website after some times, my browser will like wait about
10-20 seconds before showing the contents. But after that, subsequent
pages is load up almost instantly. The page is not heavily loaded and
every pic should be cached.

And sometimes, after 1 or 2 days didn't access the site, when i tried to
access again, it will never load up the page. My IIS server is never
shutdown running 24/7. I have to go to my IIS server and move around
with the mouse then go back to my workstation and try again in order for
it to work. (My IIS server (also my Internet gateway) will not go into
Sleep mode because i still can surf from my workstation.)

View Replies View Related

Time Delay On Response.redirect

Is there any way to delay a response.redirect for say one or two seconds?

View Replies View Related

Timestamp In Seconds ?

i need to get the number of seconds since Jan 1, 1990 or 70 or something to compare session times ... how do i get the timestamp in seconds ...

btw the msdn library is not a very good one ... does any one know an asp manual simillar to php (downloadble) ...

View Replies View Related

Trimming Seconds

Code:

StartTime = FormatDateTime((rs("startdate")),3)

this returns

7/4/2006 1:00:00 AM

I need to trim the seconds off so it looks like this

7/4/2006 1:00 AM

View Replies View Related

Date Difference In Seconds

Basically I have 2 times:

timea = (date here) 12:00:00 PM

timeb = now()

and what i want to do is compare the difference in seconds between the two.
But I'm struggling and the thought has crossed my mind that DateDiff only works with dates not times...

Code:

<%
Dim DateToCompareTo
DateToCompareTo = 4/10/2005 1:00:00 PM
%>

There are <%= DateDiff("s", Now(), DateToCompareTo) %> seconds left %>!

View Replies View Related

Seconds To Date Format

I have a variable that returns a certain number of seconds. Is there a function that can format this into something more useful?

For example, if the variable returned is 32, then it would format it to say "32 seconds"

If the variable is 312, then it would return "5 minutes and 12 seconds"

If the variable was 7315 then it would return "2 hours, 1 minute, and 55 seconds"

And so on.

View Replies View Related

Response.Redirect In 5 Seconds?

Is there a way to response.redirect to a url within 5 seconds or something, so its not right away? I was thinking meta refresh, but everywhere I go online it says that meta refreshes are not a good idea.

View Replies View Related

Seconds Portion Of Time

I'm having a problem with this code:
Code:

<input type="hidden" name="lastdate" value="<%=now%>">

not returning the "seconds" portion of time. It writes the date and time - but only to the minute. The seconds are 00 each time. Ex. 1/29/2005 1:47:23 PM is what I want and 1/29/2005 1:47:00 PM is what I'm getting.This is the result I'm getting on two separate DB's on two different servers. I'm sure there's some glaring problem I'm overlooking because I sure can't see it.

View Replies View Related

Converting Seconds To Minutes

I have a column in my Access db that stores a number which is supposed to be seconds. How can I convert the seconds to display mm:ss on my ASP page? For instance, if the number in the db is 300, I want it to display 5:00 on my page.

Now these are lengths of time, not current time (AM or PM), so I dont want it to display the AM or PM. I've tried format(rs("length"), "nn:ss") and that didnt work. Matter of fact Format(), FormatDateTime(), and FormatNumber() doesnt work on my page. I've been getting the 800a000d Type Mismatch error. What am I doing wrong? Code:

View Replies View Related

Redirect A User After A Few Seconds

I'm trying to set up an asp script that redirects a user after a few seconds on a page- I cant use meta tags to redirect due to the page structure.does anyone have any similar scripts they could share?

View Replies View Related

Time Difference In Seconds

I'd like to find the time difference in seconds in my ASP-code, but can't find how to do this. In php you have the time() that give the seconds from 1.1.1970 (?) until now. Is there something like this in ASP too? I have found the DateDiff that one just gives days, right? I basicly want to have two variables, time1 and time2, and show the seconds between them.

View Replies View Related

Time Format: Get Rid Of Seconds

I have a simple calendar scipt that ask for time of event input. While I like the time feature I do not like the fact that it displays with seconds included.

Ex. Displays HR:MIN:SEC 5:05:30 PM

Desired display 5:05 PM

How do I get rid of the display showing seconds? I have changed the database format, but this does not seem to effect the disply on the asp page.

View Replies View Related

Converting Seconds Into Time

I need to convert seconds into time since for a message board application.

"minutes ago, hours ago and days ago" etc.

I have capture the time of the original post and compared it to the time now getting seconds but having a little trouble working out the seconds into time. Have used calculations (/60 minute), (/3600 hour), and (/86400 hour) but the time remaining is bugging me.

View Replies View Related

Page Generation Time In Seconds

The code to show how long it took the page to generate in seconds ?!?, if you get onto the main page of this site, www.tgplus.net and loom at the left had side, it tells you how long it took the page 2 generate.

View Replies View Related

Years, Months, Days, Hours, Seconds

Been playing with the function DateDiff, and with it it's easy to calculate the difference in years/months/days between two dates. However, if i wanted to calculate the difference in Years, Months, Days, Hours, Seconds (a la Ebay bids) how can I do this? Is it easy or complicated?

View Replies View Related

Countdown Timer By Day, Hour, Minute And Seconds

how to do the count down timer? which their is count down timer for sepacific day, hour, minute and second.

View Replies View Related

I Am Having Problems With Calculating The Total Seconds From Two Date/times.

I need to get the number of seconds when subtracting two date/times.
With the code I am using below I subtract the two date/times and end
up with a total of days like "1.56".

Then when I multiply it to get
the number of seconds I am not getting an accurate number. I should
only have whole numbers of seconds with nothing past the decimal
point. I would like to be able to subtract the two date/times and get
the number of seconds without multiplying to get it. Is this possible?
Does anyone have a better more accurate way to do this? Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved