Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exe on server stops working until clicked on
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Exe on server stops working until clicked on
Miscellaneous
Thread ID:
00841628
Message ID:
00841628
Views:
63
Hi folks. I have an tiny exe (VFP8 SP1) that runs on our Windows 2000 webserver. This exe reads a table, which represents a queue of reports to be run. There are three identical exes that run reports in different folders. Every once in a while (it may take weeks), one of the exes will stop reading from the VFP table. If I sign into the server with PCAnywhere and click on the application (each has tiny form) the application starts reading requests from the table again. Any ideas why this might be happening?

If needed, here is my code.
DO WHILE .T. && always run
	DOEVENTS && allow person to shut down report server
	=Sleep(500) && sleep for .5 of a second to allow server CPU to server other requests
	DOEVENTS && allow person to shut down report server

	* checks queue for new items added
	* go to next request in queue that hasn't be started
	SELECT reportq
	SET ORDER TO id
	
	* force use to see new records by locking and unlocking
	IF RLOCK('0', 'reportq') then
   		UNLOCK RECORD 0 in reportq 
	ENDIF

	LOCATE FOR reportq.started = {}
	IF FOUND() = .T. && pending reports
		* execute report
		oRep = CREATEOBJECT("reportmaker")
		? TTOC(DATETIME()) + ": " + reportq.repcomm
		REPLACE reportq.started WITH DATETIME()
		lcCommand = reportq.repcomm
		lcXML1 = reportq.xml1
		lcXML2 = reportq.xml2
		lcResult = &lcCommand
		RELEASE oRep
		* upon completion writes report path and file name or message to queue
		SELECT reportq
		REPLACE reportq.result WITH lcResult
		REPLACE reportq.finished WITH DATETIME()
		? TTOC(DATETIME()) + ": " + reportq.result 
		RELEASE oRep
		lcResult = "" && blank out for next time
		lcCommand = "" && blank out for next time
		lcXML1 = ""
		lcXML2 = ""
	ENDIF
ENDDO
Next
Reply
Map
View

Click here to load this message in the networking platform