|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Polling Trigger / Time Trigger |
« View previous topic :: View next topic » |
Author |
Message
|
i.x |
Posted: Wed Mar 30, 2005 1:04 am Post subject: Polling Trigger / Time Trigger |
|
|
Apprentice
Joined: 11 Aug 2004 Posts: 26
|
Hello Guys,
i want to use a script that reads out a folder and is looking for new files in this folder.
If a file in the folder exists it should be put to a MQ Queue...
This all works.. but NOW:
The script should be triggered in a time intervall. (every 5 minutes)
Is it possible to create a time trigger in my MQ that runs every 5 minutes a process? or have i to realise this with Operating System tools? (i hope not)
Or does MQ have any other trigger possibilites to run scripts in a time intervall?
Thank you  |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Mar 30, 2005 1:24 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
AFAIK MQ has no timed trigger controls...
You either run an OS timed control to start the script OR...
send a message to a queue from a central location and then use MQ triggering to start the script.
The advantage of the second option is you can 'control' the timing from a central location if needed. _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
kman |
Posted: Wed Mar 30, 2005 11:08 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
Quote: |
i want to use a script that reads out a folder and is looking for new files in this folder.
If a file in the folder exists it should be put to a MQ Queue...
|
OK. That's normal.
Quote: |
Or does MQ have any other trigger possibilites to run scripts in a time intervall?
|
Ok, which one is this? Is this about MQ trigger or script trigger or both? Michael was correct, AFAWK there is no time trigger control for MQ trigger. But then why not use the sleep function in your script?
Use MQ tiggering to start the script would require you to send a message to the script. And you need to send the message in a time sequence. And that still does not guarantee the time is correct to the seconds. Because you need a program to send a message to the trigger queue, and the trigger monitor has to notice it, then start the script.
I would go with a timer in the script, or get the OS function to do it - whatever that is.
I have similar requirement before, and I settled for sleep interval.  |
|
Back to top |
|
 |
jfluitsm |
Posted: Wed Mar 30, 2005 11:33 pm Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
What you can do is loop your script with something like a sleep command.
I have implemented a similar solution for a customer using a Java program that looks for added files in the directory and starts a script for every added file. _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|