Open topic with navigation

TIBCO GridServer® 7.1.0

# Prejob and Pretask Blocks

PDriver Jobs and tasks might require preprocessing. For example, you might need to prepare files, move them to an Engine, start a database, or do other preparation before the `task` block begins. To provide this functionality, two blocks are available to run before the task block: `prejob` and `pretask`. The two blocks start with either `prejob` or `pretask` and end with an `end`, and they can contain any number of statements. Also, both blocks of code must be located before the `task` block in your PDS script.

One difference between these two blocks is that `prejob` runs once, at the start of the job, and `pretask` runs once per Engine, prior to the start of the first task to run on that Engine. Also, the `prejob` block code executes on the Driver (that is, the machine on which you are running PDriver), and the `pretask` block code executes on the Engine.

    prejob
        statements
    end
    pretask
        statements
    end
    task taskcount
        statements
    end

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.