Job dependencies mean that jobs depend on the status (such as
) of other jobs to run. Using file dependencies, you can have jobs depend on the availability and status of files as a condition of execution. File dependencies are set up using the
dialog which is accessible when you create or edit a job definition.
In this chapter, we will create a job (
) that is dependent on the existence of the
Figure 7-1 EDI_Download Job Depends on the Existence of the EDI_File File
To properly complete this exercise, you need to have a solid understanding of the following concepts:
How to add and create a new job definition
How to navigate to and between the
pane and the
This chapter describes how to:
Create a job with a file dependency
Create a file to satisfy the dependency
Note To complete the exercises in this tutorial, you need to:
in the default directory Scheduler (or the examples in this tutorial will not work properly)
option in your User definition
Configure a default agent
Create and have available the work day calendar
Creating a Job with a File Dependency
To create a job with a File dependency:
1. From the
to display the
2. Right-click in the
pane of the console and select
from the context menu, or click the
button on the toolbar.
3. In the
4. On the
tab, enter the full path to
5. Click the
tab and from the
list select the
6. Click the
7. Display the
dialog by clicking the
button and selecting
Add File Dependency
C:\Program Files\<Installation Directory>\Agent\Tutorial\Edi_File.txt
The full path to this file must be typed in because the file does not yet exist. We will create
later, in the section Creating a File to Satisfy the Dependency.
field should already have a Windows agent listed–the agent you selected as your default agent at the beginning of this tutorial. If there is no agent listed or an agent other than the Windows agent is selected, then select your local Windows agent from the
to accept the default settings. Enteprise Scheduler’s default is that the dependency is met after the file is created.
9. Click the
The full path to
appears in the
of dependency is listed as
to indicate that it is a file dependency.
to save the job definition for
dialog to add the job to the schedule.
Viewing the Job in Production
To view the job in production:
1. Open the
job first appears with a
Waiting on Dependencies
status. It goes through different stages and ends in a Scheduled status.
Figure 7-2 EDI_Download Job Scheduled to Run
3. Select the
4. Right-click the
job and select
from the context menu to see its
5. Click the
tab to view the file dependency status.
dialog displays the file dependency for this job.
to close the dialog.
Creating a File to Satisfy the Dependency
In this example, the dependency only requires that the file exists and does not require any specific data. For this exercise, we just create an empty file since the job does not require any data from the file. Normally, however, this kind of dependency is set up because the job uses the data from the file’s input.
To create a file to satisfy the dependency:
1. Open a new document in a text editor or word processing program, such as Notepad or Microsoft Word.
2. Save the file as
in the location that you specified when defining the file dependency (
C:\Program Files\<Installation Directory>\Agent\Tutorial EDI_File.txt
), substituting the name of the directory where Scheduler is installed for
Some software will supply a file extension for you, such as
. For your file to satisfy the dependency, the name must match exactly. Saving as a plain text file helps ensure the correct file name.
3. Double-check that the file exists, is correctly named and in the correct directory.
Monitoring the Job in Production
You can see that the file dependency for the
job is met and the job goes from a
Waiting on Dependencies
state into an
Congratulations! In this chapter, you have created a job with a file dependency, and fulfilled that dependency requirement by creating the file. By this time, you should also feel comfortable with moving between the
pane, and with the basic procedure for adding a job.