Running an Informatica workflow hourly, but only between specific hours of the day

If you need a workflow to run every day, but only during working hours, for example you need a workflow to only run if the time is between. 8:00 a.m. to 6:00 p.m., try this technique.

Use a Decision task to compare a workflow's start time to a range of hours/minutes you specify.

The general idea is, using a Decision task you compare the workflow start time with a predetermined time, then within the link to the session that occurs after the decision task,  you evaluate the result of the decision and if it is TRUE, the workflow will continue running, else it will end without error.

If you download the example workflow and examine the code, you will notice some unusual logic in the Decision task.  In order to test if the workflow start time is within my range, I have to use the GET_DATE_PART function to get the hour part of the workflow start time. The result of this function had to be converted to character (To_Char function) and appended with a zero (LPAD function) if the time was less than 10.

These cumbersome steps were required so the comparison could be made using hour and not hour/minutes.

I have a sample workflow that demonstrates this technique, you can download a copy here.

If you have Informatica support, you can search the Knowledge base for articles KB 104712 and KB 21253 for their comments about similar solutions.

I would be happy to hear from anyone using this technique or if someone has found an easier, more productive way to accomplish the same thing.

Thank you for your support
 or  PayPal

IMPORTANT,  YOU are responsible for backing up your systems before trying or implementing any suggestions from this blog.  I do not guarantee 100% accuracy in any code examples.  I do not presume to know your system environment(s) or Security requirements; all code examples from this blog should be thoroughly tested before any attempted use on a production system.

0 Response to "Running an Informatica workflow hourly, but only between specific hours of the day"

Post a Comment