03-16-2015 03:55 AM - edited 03-01-2019 09:13 AM
we have to schedule batches for below scenario.
--
Step 1. Batch 1 will download a file from ftp/curl
Step 2. Batch 2 will process the file downloaded in step 1
step 3. if batch 2 completes OK , run the dependent jobs otherwise in case of Batch 2 failure , download file again (run the batch1 ) after some interval (2 hour)
can someone please help us in scheduling for above scenario in TIDAL .
Thanks
03-31-2015 03:20 PM
What is your Agent platform windows? Each scenario is different and I can think of several ways.
but I think at a min you need to use job groups to separate 2 & 3 with 3 waiting for a completed normally.
Personally
I would put 1 & 2 inside a powershell script and use that with a simple re-run event if completed abnormally (the built in events are at the bottom... you can control how many times it reruns as you add event to job with a dialog box)
Inside the script after I evaluate the processing step and create a marker file named something like Batch2Complete_20150331.txt and make # 3 group depent on that ... sort of guarantees that it worked.
Or
alternatively you could use another job that monitors the processing job and re-insert the group of 1 & 2 with override that has your 2 hour delay built in
powershell example:
start-sleep 7200 (it is in seconds so 7200 = 2 hours)
Script.ps1
might put you on the right track
04-02-2015 02:39 AM
Adding on to the first option suggested above ...
Can we not have jobs 1 and 2 in one job group and 3rd in another. Set a dependency between the job groups.
Create the job event/action on the first job group to rerun N times
In place of marker file, we could also use a Tidal variable. Set the dependency for second job group on the variable value. Remember to reset the value of variable once Job group 2 is active
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide