Auto Run Procedures In Windows App
-
Hi, I'm sitting with a weird problem. I created an application in C# 2005 Express. It has 3 timer controls in it. The first timer runs as a clock (system clock) and once this timer reaches a specific time during the day it runs its procedure (this works fine) The 2nd timer has its Interval set to 10min. So every 10 minutes it needs to run its procedure.(doesn't do it) The 3rd timer has its Interval set to 10Sec. So every 10 second it needs to run its two procedures (doesn't do it either); Now when i run this app in debug mode everything works perfect. Breakpoints are being reached all the time, I don't see any problems. But once i publish the app and install it on a users machine it doesn't always run the procedures :confused: As u probably realized is that this application is an auto update app which auto updates data (retrieve data from webservice then update the local SQL database) Any help would be greatly appreciated. I need to get this working by midday tomorrow. Any other suggestions would be great. Thanks
-
Hi, I'm sitting with a weird problem. I created an application in C# 2005 Express. It has 3 timer controls in it. The first timer runs as a clock (system clock) and once this timer reaches a specific time during the day it runs its procedure (this works fine) The 2nd timer has its Interval set to 10min. So every 10 minutes it needs to run its procedure.(doesn't do it) The 3rd timer has its Interval set to 10Sec. So every 10 second it needs to run its two procedures (doesn't do it either); Now when i run this app in debug mode everything works perfect. Breakpoints are being reached all the time, I don't see any problems. But once i publish the app and install it on a users machine it doesn't always run the procedures :confused: As u probably realized is that this application is an auto update app which auto updates data (retrieve data from webservice then update the local SQL database) Any help would be greatly appreciated. I need to get this working by midday tomorrow. Any other suggestions would be great. Thanks
-
Hi, I'm sitting with a weird problem. I created an application in C# 2005 Express. It has 3 timer controls in it. The first timer runs as a clock (system clock) and once this timer reaches a specific time during the day it runs its procedure (this works fine) The 2nd timer has its Interval set to 10min. So every 10 minutes it needs to run its procedure.(doesn't do it) The 3rd timer has its Interval set to 10Sec. So every 10 second it needs to run its two procedures (doesn't do it either); Now when i run this app in debug mode everything works perfect. Breakpoints are being reached all the time, I don't see any problems. But once i publish the app and install it on a users machine it doesn't always run the procedures :confused: As u probably realized is that this application is an auto update app which auto updates data (retrieve data from webservice then update the local SQL database) Any help would be greatly appreciated. I need to get this working by midday tomorrow. Any other suggestions would be great. Thanks
try logging some "I'm in this method" statements and see which code is not executed. debug mode may work since one breakpoint pauses all threads.
-
Why don't u use threads to run your code. You can use your time to control the different threads in your app.
I was doing this but gets too complicated to run one procedure say at 13:00 everyday and 2 other procedures on different time intervals. If i run a procedure under a timers tick event, isn't that set in its own thread too? I'm just worried that if two different procedures run at the same time so they don't crash or something.
-
try logging some "I'm in this method" statements and see which code is not executed. debug mode may work since one breakpoint pauses all threads.