|
I wnat to know is there a wayout in ASP to run code automatically on server side?Plz do send me sample if it is posible.
Regards & Thanx.
|
|
|
Not sure I understand your question - all ASP code runs on the server.
|
|
|
I think i got your question as i faced that problem before and i couldn't solve it.
The question is how to run the script in the server without visiting the page that the code writeen in.
If anyone has the answer please answer.
BMS
|
|
|
there's no way to do this that I know of - the best I know is to call it from a popular page at approximately the time it's needed..
|
|
|
i suggest you make auto refresh on that asp page.
|
|
|
Hmmm...let`s look at what you really want to do. If it`s a task that you want to fire and run at a specific time or interval, then the script doesn`t need to be a web page since there will not be a browser-based user interacting with the code. Make sense?
So then you have to ask, do you need ASP for what you want to do? Probably not. Probably all you need is VBScript and maybe interaction with a SQL Server or Access file or a component or two. If so, you can create a VBScript or WSH script (Windows Shell Script) to do what you want. Then you can schedule it using Windows Task Scheduler or the Windows Console "at" command. (I used this for an Internet application that needed monthly reports automatically emailed to specific managers.)
If you really do need the script to be an actual ASP page, then you can build a scheduled VBScript that uses the Microsoft XML Core Technologies 4.0 component to "call" your ASP page. This is not difficult, but if you are new to the MSXML component, it`s a bitch at first!
|
|
|
|
|
So then you have to ask, do you need ASP for what you want to do? Probably not. Probably all you need is VBScript and maybe interaction with a SQL Server or Access file or a component or two. If so, you can create a VBScript or WSH script (Windows Shell Script) to do what you want. Then you can schedule it using Windows Task Scheduler or the Windows Console "at" command. (I used this for an Internet application that needed monthly reports automatically emailed to specific managers.)
If you really do need the script to be an actual ASP page, then you can build a scheduled VBScript that uses the Microsoft XML Core Technologies 4.0 component to "call" your ASP page. This is not difficult, but if you are new to the MSXML component, it`s a bitch at first!
how can it be done ?? any idea ....
|
|
|
What exactly do you want to do? Are you trying to run a script every specific interval to update the time and date on a page without actually refreshing the page? Or are you trying to run a script every specific interval to update database content or perform a specific action on the interval every time?
If it's the latter... I have heard of one way to do it, but i've yet to try it myself... Look up on google something called a Cron command or other wise known as Crontab. It's a piece of software that will do just what you want to do, the only problem is it only runs on linux and it can be extremely draining on the server... If you are running a good server though i don't think it would be too much of a problem. I have not yet tried it myself, i need to purchase a new box i can use as a deticated linux server before i play around with it...
I am going to try out that WSC way of doing it that was mentioned above and see if that will work the way i'd like it to... I personally need to do something similar on my test machine which is running windows, I need to update A LOT of database content every hour ON the hour automatically...
However, if you're talking about just updating the time and date on the page every specific interval, like every minute, hour, second, day, or etc etc... You can write a simple ASP page using the NOW() command and then use an AJAX script to run the asp page every specific interval.. that's pretty easy to do actually...
If neither of these suggestions apply to what you're trying to do... be a little bit more specific so we can suggest alternatives :P
|
|
|
|
|
|
|
my friend will rePly 2maro
|
|
|
<html>
<Title>Master</Title>
<Body>
Hi Rajesh. This is sample code..
I want to know Procedure. how i can do.
plz .. hellp me
</body>
</html>
|
|
|