how to run a program on a particular time of interval in running application?

Dear All,

My queries is "How to run a Program in Background on a particular time of interval (only one time login with in the application)".

Please Help me.

Regards
Manoj Kumar.
 
From the cryptic message i seem to decipher that he wants this to run within a application without multiple login.

(only one time login with in the application)

I *think* this means he wants to use a Timer and fire a program at different time interval.

This would mean that PSTimer is what you need to use. BUT be very careful because a timer used in a input blocking program can create very weird behavior especially with Dialogs.
 
I guess we need clarification from the OP. If this is something like a daemon that needs to run every 15 minutes, then cron is the answer. If this is a polling function within a session, then PSTimer might be the answer ... depending on platform. But, if the question here relates primarily to the idea of one session, i.e., the OP doesn't want to fire off a second session, then one is out of luck since the Progress AVM is inherently single threaded at this point.

Within a single session, the choice is between using something like PSTimer, if it works on your platform, which is going to interrupt the current processing flow, unless, of course, the current flow is in the middle of something uninterruptible, like a long-running query. Or, in managing one's own internal timer, i.e., check periodically to see if enough time has elapsed since the last operation. The latter, of course, depends on frequent checks and is not easily distributed through all the code, but it does work for checking for mail or something when at a menu.

Bottom line, though, doing it within a single session will be unreliable as to the exact time the next process happens. Does that matter?
 
Hello Francoisl,

Yes, you are right. Please tell me how i will do this.


From the cryptic message i seem to decipher that he wants this to run within a application without multiple login.



I *think* this means he wants to use a Timer and fire a program at different time interval.

This would mean that PSTimer is what you need to use. BUT be very careful because a timer used in a input blocking program can create very weird behavior especially with Dialogs.
 
Hello Francoisl,

Yes, you are right. Please tell me how i will do this.
But my application is in Char or Progress 4GL.



From the cryptic message i seem to decipher that he wants this to run within a application without multiple login.



I *think* this means he wants to use a Timer and fire a program at different time interval.

This would mean that PSTimer is what you need to use. BUT be very careful because a timer used in a input blocking program can create very weird behavior especially with Dialogs.
 
PSTimer is a windows-only option.

UNIX ChUI users do not have access to timers or timer equivalents.

You should let Progress know that you would like native timers added to the language. If enough of us keep asking they might even do it some day.
 
Back
Top