Open topic with navigation

TIBCO GridServer® 7.1.0

# Posttask and postjob blocks

After a PDriver task or job runs, you might want to run code to do some postprocessing. For example, you can use `posttask` blocks to clean up the state on the Engine. You can use the `postjob` blocks to move results to other locations. Like the `pretask` and `prejob` blocks, simply surround your code with a `posttask` or `postjob` keyword at the beginning, and an end keyword at the end. Locate both blocks of code after the task block in your PDS script.

Code in the `posttask` block runs on each Engine after the job completes, while code in the `postjob` block runs once on the Driver. One important difference in the `posttask` and `postjob` blocks is when they are executed. The `posttask` block happens after all of the tasks are completed. There’s no guarantee that they happen immediately after the tasks are done, but they finish before the job ends. If you are running your job synchronously, the `postjob` block runs when the job finishes. And if you used `pdriver -bsub` to submit a job, the `postjob` block runs when you collect the results.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO GridServer®

Copyright © 2001-2022. TIBCO Software Inc. All Rights Reserved.