0

We have multiple jobs that serves as threads for file loading. But we want to trigger jobs only when file is received. So we created a file watcher job in control-M. We want to trigger thread Job for each file. So one file will be processed by a single thread job. For example: If only one file is received only one thread job should be triggered say Thread1 job is triggered. Now after 1 min a new file is received then since Thread1 job is already running so Thread 2 job should be initiated.

I think, if we could post condition pro-grammatically in Control-M my purpose will be solved. Please help and comment if any more information is required.

2 Answers2

1

You could have the filewatcher post a generic out-condition then configure a dummy job at the start of each thread that would require exclusive control over a control resource and on completion delete it's in-condition and kickoff the rest of the thread.

  • 3 file arrive.
  • Filewatcher completes and posts out-condition.
  • Only one thread header can start, it then removes the out-condition and continues the thread.
  • Filewatcher runs again, completes and posts out-condition.
  • Only one thread header can start, it then removes the out-condition and continues the thread.
  • etc..
Mad Physicist
  • 107,652
  • 25
  • 181
  • 264
Jasper
  • 192
  • 8
0

Its not clear where you are trying to use the conditions, but its possible to add conditions programatically using the ctmcontb utility.

ex: ctmcontb -ADD Condition_Name ODAT