Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Invoking a vbscript code once in 24hrs

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,1928
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Invoking a vbscript code once in 24hrs
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Invoking a vbscript code once in 24hrs - 1/29/2005 4:15:13 AM   
  vineet_18@yahoo.com

 

Posts: 1
Score: 0
Joined: 1/29/2005
From:
Status: offline
Hi All,

I have a code in vbscript and I want to invoke it once in 24hrs to perform a check in the database.How can I do that in asp.

Thanks in advance for any help.
 
 
Post #: 1
 
 Re: Invoking a vbscript code once in 24hrs - 2/10/2005 8:54:42 AM   
  wolfberg

 

Posts: 4
Score: 0
Joined: 11/21/2004
From:
Status: offline
there is probably a better way, but the way I do it is by refreshing an asp page via a javascript. Just set the page to refresh every 24 hours. round about, but works

<script language="JavaScript">
// CREDITS:
// Automatic Page Refresher by Peter Gehrig and Urs Dudli www.24fun.com
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.hypergfurl.com.


// Configure refresh interval (in seconds)
var refreshinterval=1000

// Shall the coundown be displayed inside your status bar? Say "yes" or "no" below:
var displaycountdown="no"

// Do not edit the code below
var starttime
var nowtime
var reloadseconds=0
var secondssinceloaded=0

function starttime() {
starttime=new Date()
starttime=starttime.getTime()
countdown()
}

function countdown() {
nowtime= new Date()
nowtime=nowtime.getTime()
secondssinceloaded=(nowtime-starttime)/1000
reloadseconds=Math.round(refreshinterval-secondssinceloaded)
if (refreshinterval>=secondssinceloaded) {
var timer=setTimeout("countdown()",1000)
if (displaycountdown=="yes") {
window.status="Page refreshing in "+reloadseconds+ " seconds"
}
}
else {
clearTimeout(timer)
window.location.reload(true)
}
}
window.onload=starttime
</script>

(in reply to vineet_18@yahoo.com)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Invoking a vbscript code once in 24hrs Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts