Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Write an app to start and kill another app periodically
Re: Write an app to start and kill another app periodically [message #28632 is a reply to message #28618] Wed, 08 September 2010 16:26 Go to previous message
jpderyck is currently offline  jpderyck
Messages: 15
Registered: October 2008
Location: Belgium
Promising Member
Dear Honza

thanks for help,

the application that I need to monitor with a kind of watchdog communicates with a data acquisition module (LabJack U3) via usb port. It takes measures every 10 seconds and put results in a MySQL table. After running for a time between 1 month and 3 months, the application enter in hung state (the main window becomes blank) and the only thing to do is restart the program.

I do not know if the problem is in the usb reading part of the program or in the MySQL part.

In the 'main' I use two timers:
SetTimeCallback(-10000, callback(this, &MyApp::Timer1));
SetTimeCallback(-300000, callback(this, &MyApp::Timer2));

Timer1: do measure and store it to databases
Timer2: reduce size of one table to keep 7 days of data

maybe I could change this to :
mytimer.KillSet(10000, THISBACK(Timer1));
in the 'main'

and in the Timer1() function :
mytimer.Kill();
do the measures and others and at the end :
mytimer.KillSet(10000, THISBACK(Timer1));

but normally the code between stop and restart timer should not last more than 1 second and so I should never have re-entry problem but...

if you have any suggestion

best regards
Jean-Paul
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [BUG&FIX] LocalProcess can not be reused
Next Topic: String.Mid() and Unicode
Goto Forum:
  


Current Time: Wed Aug 27 12:29:31 CEST 2025

Total time taken to generate the page: 0.06414 seconds