Defining file dependencies in dynamic scheduling
You can manage file dependencies with dynamic agents, pools, and dynamic pools
File dependencies introduction
You use file dependencies in dynamic scheduling to control job and job stream processing that is based on the existence of one or more files or directories. When you specify a file dependency, HCL Workload Automation processes check if the specified file or directory exists before job and job stream processing starts.
- The file exists.
- The file exists and is a directory.
- The file exists and is a regular file.
- The file exists and is readable.
- The file exists and its size is greater than zero.
- The file exists and is writable.
File dependencies behavior
- Dynamic agents
HCL Workload Automation manages the file dependency resolution for dynamic agents, in the same way as for the workstation that is defined in the classic scheduling as fault-tolerant agent, master domain manager and its backup, domain manager and its backup, and so on.
If you define the
JOB_A
job onDYN_A
dynamic agent, which depends on theFILE_A
file, beforeJOB_A
job runs, HCL Workload Automation processes perform a file existence check on theDYN_A
workstation. When theFILE_A
file is found, the dependency is resolved and theJOB_A
job runs on theDYN_A
dynamic agent.- Pools and dynamic pools
-
A pool contains several dynamic agent workstations with similar hardware or software characteristics. A dynamic pool contains several dynamic agent workstations that are dynamically defined based on the resource requirements you specify. If you define a file dependency for jobs or job streams that are defined in a pool or a dynamic pool, HCL Workload Automation processes perform a file existence check on a dynamic agent workstation of the pool or dynamic pool, randomly selected.Note: To check the file dependencies, you must create the file in a file system that is accessible by all the workstations in the pool.
The file dependency is resolved when the first file is found on a dynamic agent workstation. The job does not necessarily run on the dynamic agent workstation where the file is located, but runs on one of the active workstations in the pool or dynamic pool when the file dependency is resolved.
HCL Workload Automation processes perform a file check, and the code selects the workstations that are available inside the pool. However, The file check does not perform for all the workstations.
If you have to make the file dependency work. Ensure the path on which the file has been created; and is accessible for all the workstations in the pool i.e. You have to share the file system on which the file is created, with all the workstations in the pool.
In your environment, you have
POOL_A
that containsDYN_A1
,DYN_A2
,DYN_A3
dynamic agents. If you define theJOB_A
job inPOOL_A
pool, which depends on theFILE_A
file, beforeJOB_A
job runs, HCL Workload Automation processes perform a file existence check on theDYN_A1
,DYN_A2
, andDYN_A3
workstations. If theFILE_A
file is found on theDYN_A2
workstation, the file dependency is resolved. TheJOB_A
job automatically runs onDYN_A3
which is the active dynamic agent workstation in thePOOL_A
pool.
How to define file dependencies
You can
define file dependencies for jobs and job streams on dynamic agents,
pools, or dynamic pool workstations, by setting the opens
keyword in the job or job stream scheduling definition. For more
information about the opens keyword syntax, see opens.
/opt/SF1-DIR/myfileSF1.txt
file exists and is readable on the
DYN-AGT-SF1
dynamic agent workstation before the
SF1-JOB-HOSTNAME-0001
job runs on the DYN-AGT-SF1
workstation:SCHEDULE MDMWKSNY1#NY1-JS1
VARTABLE VARTABLENY
OPENS DYN-AGT-SF1#"/opt/SF1-DIR/myfileSF1.txt" (-r %p)
:
DYN-AGT-SF1#SF1-JOB-HOSTNAME-0001
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/
scheduling/1.0/jsdl"
xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle" na
me="executable">
<jsdl:application name="executable">
<jsdle:executable interactive="false">
<jsdle:script suffix="">hostname >>/opt/SF1-DIR/myfileSF1.txt
</jsdle:script>
</jsdle:executable>
</jsdl:application>
</jsdl:jobDefinition>
RECOVERY STOP
END
See also
You can define the file dependencies for jobs and job streams also, by using the Dynamic Workload Console.
For more information about how to define file dependencies by using Dynamic Workload Console, see: