|
-
Jan 11th, 2002, 03:36 PM
#1
Thread Starter
Hyperactive Member
leave prog running on server???
A lot of you have probably seen my posts recently on how I can get my prog to open from asp or dll or something. That doesn't seem to be working for me.
Tell me if this is a real bad idea or not.
I was thinking of having my program stay running constantly on the server. I can put it into a loop, constantly checking to see if a file exists... if the file does exist, it will read in the first line (which, will be the pathname for a variable my prog uses) and do the stuff it needs to do, then delete the file. Whenever somebody clicks a certain thing on the web, the asp will create the file again, and write the pathname in it. etc. It's pretty simple, and I have it so it works, just wondering about system resources and stuff.
bad idea or no?
thanks,
Paul
-
Jan 11th, 2002, 03:42 PM
#2
The only true way of knowing what system resources will be used up is to try for a while, and keep monitoring the server. There are lots of people who keep programs running constantly on servers. Whether it is a good idea or a bad idea depends a lot on the horsepower of your server and the dictates of your situation.
-
Jan 11th, 2002, 04:10 PM
#3
Thread Starter
Hyperactive Member
does this code look ok? or is ther something better you can think of?
VB Code:
Private Sub Form_Load()
Dim strPathToFile As String
Dim cptPath As String
strPathToFile = "C:\Inetpub\wwwroot\cpthandler\simpleTest\filePath.txt"
Do While Exists(strPathToFile)
If Exists(strPathToFile) = True Then
Open strPathToFile For Input As #1
Line Input #1, cptPath
MsgBox (cptPath)
'My app code will be here instead of msgbox
Close #1
Kill (strPathToFile)
Else
Sleep (500)
End If
If Exists("C:\Inetpub\wwwroot\stop\stop.txt")
End
End If
Loop
End
End Sub
-
Jan 11th, 2002, 05:16 PM
#4
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|