Page 1 of 1

Posted: Thu Mar 14, 2013 9:29 am
by prasson_ibm
Hi Manoj,
If your source file is different for all three jobs,then in my view you need to create three different sequences with many loops.

Code: Select all

startloop----> waitforfile------>JobA ---->ExecCommand---->EndLoop
startloop----> waitforfile------>JobB  --->ExecCommand---->EndLoop
startloop----> waitforfile------>JobC  --->ExecCommand---->EndLoop
You have to run this loop always.Setting in startloop will be:-

LoopType=Numeric Loop
Loop definition:-
From-1
Step-1
To-9999999

Waitforfile will look that if mentioned file is present or not,as soon as its present there it will trigger your job.

After your job is finished,you have to move file to archieve folder or some archival approach you need to apply.
In case of job failuar,you need to handle what exactly you want to do after that.

Posted: Thu Mar 14, 2013 6:22 pm
by chulett
I know you're not looking for an answer of this nature but in my mind this is where a decent Enterprise Scheduling tool would come in handy.

Posted: Fri Mar 15, 2013 1:16 am
by hi_manoj
Hi All,
Prasson, Thanks a lot for you effort, can this be done in one sequence if not I will convince them to have 3 seq one for each job

startloop----> waitforfile------>JobA ---->ExecCommand---->EndLoop

I want to run the job between 6 am to 8 pm.
As per your approach the job will start and it will wait for the file (say for 15 min) and it find the file and run the Job A, archive the file, goes to endloop and again comes back to sartloop . Suppose for next 15 min it did not find the file, here i want the job should not stop and directly goes to endloop and comes back to startloop (it should not try to run Job A)

This process will continue till 8 pm and the end it will send a mail saying how many times the job A rune for that day.

Please suggest a approach.

Regards
Manoj

Posted: Fri Mar 15, 2013 2:56 am
by prasson_ibm
Hi,
As Chulett suggested,you should need a enterprise scheduling tool.If you are using scheduling tool,you can schedule your sequence to run between 6AM to 8PM .
In case you dont have any scheduling tool,you can probably explore "crontab" command on unix box.

If you dont want to make your job dependent on file,then why dont you trigger your job for every 15 mint and pass unique Invocation id (make your job run on multiple instence) for every run.In this case you dont need start and end loop activity.
At last you need to count the number of invocation_id you passed to the job and send it through a mail.

Posted: Fri Mar 15, 2013 4:11 am
by hi_manoj
Hi,

I have design the sequence (each for a job) and it looks like this.

Code: Select all

startloop --> filewatcher --> job A 
     |           |           |
     |           |           |
endloop <-- sequencer <--- Archive
but now the issue is whenever i run the job it only goes to sequence (down). It does not cones to Job A, if the file is present in the directory.

I have tried to change the triggers but no luck. Any think i am missing.

Regards
Manoj

Posted: Fri Mar 15, 2013 6:46 am
by chulett
Detail for us how your FileWatcher is configured and what your trigger expressions are that come from it.

Posted: Mon Mar 18, 2013 7:41 am
by hi_manoj
Hi All,

I am trying a approach with 3 waitforfile stage. Once it is i will share the flow.
Thanks you very much for all your help.

Regards
Manoj