Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
cat66 Absent Member.
Absent Member.
893 views

Polling

I have an app which processes bank statements, which arrive every 5 minutes or so into a specified folder. Thus I need to check every 5 minutes whether new statements have arrived.I can think of a few ways of doing this, maybe using C$Sleep running as a thread and one or two others, but since this is the first time I am doing this, I dont want to waste time experimenting if someone out there has already come up with the best solution, I am sure some of the forum members have done this before, so would welcome you advice on the best method.

0 Likes
2 Replies
buggabill Absent Member.
Absent Member.

RE: Polling

In this instance with the poll time being more than a minute, I personally use a cron job to call a script to check for the files in the specified folder, and then, I call my program if the files exist. This avoids tying up a runtime license for us. We have a few programs that poll every few seconds which would be inappropriate for a cron job.

0 Likes
cat66 Absent Member.
Absent Member.

RE: Polling

Thanks very much, my app is slightly different, in that a number of users are interfacing with the app all day, so it is active all the time, but must still check for new bank statements every 5 minutes and if found, process the statements and refresh the user screens with the latest information. For that reason I was thinking of running the polling as a thread with a sleep time .  

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.