1. Sivaprakash BKR
  2. PowerBuilder
  3. Thursday, 30 November 2023 05:15 AM UTC

Hello,

PB 2022 R2 build 2819

Is it possible to fire multi-timer events from one (service) application.   Say, if I want to

a.  Send Email, by checking a table for new records, every 10 seconds.
b.  Send SMS, by checking another table for new recrods, every 1 hour.
c.  To take backup of database according to a settings, [ every one hour or at a prefixed time of a day eg. 5 pm everyday ]

The list could expand.
I've done one task in one service application, by using windows timer event.  Don't have any idea how to accomplish multi-timer events in one application.

Any idea would be greatly appreciated.

Also for point c above, how to fire an event at a particular time every day? Should we check the system's time every 1 second?

Happiness Always
BKR Sivaprakash

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 30 November 2023 05:40 AM UTC
  2. PowerBuilder
  3. # 1

Hi BKR,

Yes it's possible. Simply use a timer object for each of your tasks.

For c), I'd rather use a windows task, but it's not impossible doing so from PB either.

regards

Comment
  1. Chris Pollach @Appeon
  2. Friday, 1 December 2023 15:44 PM UTC
Hi Miguel;

I agree 100% to use the TIMIER object class in PB to implement these timed activities! I use this feature in my STD Framework exclusively for various time based activities. The key advantages are that: A) You can use them on non-Windows Apps; B) Both visual & non-Visual objects can use it; C) The Timer object features can be encapsulated; D) Multi-Threaded Apps can use this in each "thread", etc. Very versatile IMHO!

HTH BKR!

Regards ... Chris
  1. Helpful 2
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.