Importing the Cron Jobs
TA users having the legacy Cron jobs that are run on the UNIX boxes, need to import the Cron jobs to the TA system. This section consists of the processes that need to be followed for importing the Cron jobs to the TA system.
Discovering the Cron Jobs
The legacy Cron jobs that are run on the UNIX boxes are discovered from the configured agents.
To discover the Cron jobs using the Transporter interface:
-
Click Cron Jobs > Discover Cron on the Transporter Options menu.
Note: If the connections are available, choose the Client Manager (CM) to which the Cron jobs are to be imported, from the Source drop-down list. If the connections are not available, you need to create a new to the TA system.
-
Click Connect, to establish the connection to the selected CM.
-
Click Read Data. You can view the list of all the active UNIX agents and its runtime users in the summary screen.
-
Optionally, you can:
-
Click Configure to define specific job properties. The Configuration Options dialog appears.
These sections describe the options in the Configuration Options dialog:
Transport Options
Annotate – Updates either the Description or Notes (for Jobs) field with the names of the source, the user, and the date and time of the import of data objects.
Disable Copy – Disables each job as it is imported into the destination. This option ensures that the object cannot be used in the schedule until the operator manually enables it. This option only applies to jobs and other objects do not have this attribute.
Override Options Tab
The Override Options tab sets the default handling of job output.
-
Save Output Option, Override option – Choose this box to specify what will happen to the job's output.
You can choose from these options:
Discard – Does not save the job output. (Default)
Append – Saves the complete output from each job instance, adding the output to the previous job instance’s output.
Replace – Saves the complete output from each job instance, overwriting the previous job instance’s output.
Summary Only – Choose this option to save the job output in a summary form. This option is useful when jobs have long job output and you do not want the entire output file. Not available if the Discard option is selected.
-
Override option – Choose this box to control how the import jobs can be scheduled and run.
Allow unscheduled – Enables the job to be inserted into the production schedule on an as-needed basis. The default is that unscheduled instances are allowed. If you do not want the job to run on an ad hoc basis, you can clear this option to prevent non-scheduled submissions.
Allow operator rerun – Allows the operator to rerun a job. The default is allow operator reruns (options selected).
For UNIX, source user’s profile – Allows you to execute Unix user profiles. This option provides for the execution of all variables in a Unix user’s profile. Without this option, Unix user profile variables that are referenced by scripts are not being executed, causing errors in TA.
Require operator release – Holds the job until an operator releases it. The job will not run until it is released. When all the job’s dependencies are met, and it is ready to run, its status is Waiting On Operator. The information in the Operator Instructions field (Description tab) can inform the operator of any external requirements that need to be met before the job is released.
Disable carryover – Disables the job carry forward feature that appends the jobs that did not run in the current production schedule to the next day's production schedule. Any job from the current production schedule that is not in an Active or a Launched status when the next production day starts, will not be carried over to the next production day. The default is to enable job carry forward (cleared).
Cron Import Tab
Effective Date – Enter a date in the text field or click the down arrow to display a calendar where a date can be selected to indicate the earliest date that the Cron import can be compiled into the schedule.
Automatic Compile Options
These compiling options are used to control compilation of production schedules at the destination, during job import. When a job is imported, the job update will affect the destination production schedule given the options selected.
No Compile – The changes are not applied until the next time the schedule is compiled. The changes do not apply to the schedule currently running (including the future days already compiled).
Compile-Repeats Start Now – The changes are applied to the schedule currently running. Any changes that apply to the repeating jobs within the current day's schedule take effect when the schedule is recompiled. This is the same as selecting the Start today's repeating job(s) now option that is in the Effective Date dialog displayed in the TA Web Client whenever adding a repeating job with an associated calendar date belonging to the current production schedule.
Compile-Skip Repeats – The changes are applied to the schedule currently running. Instances of repeating jobs are skipped if they would have run prior to the current time.
-
Click Filter to filter the list of displayed UNIX agents. The Agent Filter dialog appears.
The elements included on this dialog:
Agent – Enter the name of the agent. When no agent is entered, all agents are assumed. The default is to show all agents.
Machine – Enter the name of the machine.
Use Server Filtering – Used to limit the number of records returned to Transporter. A query condition that specifies the filter criteria is generated on the database server, and has a direct performance benefit, especially for large scale databases. This checkbox is enabled by default.
Defaults – Clicking this button resets the agent filter criteria to the default options. This clears all text fields of their criteria.
After setting the filter criteria for agents, click OK to display only the agents in the source that meet the specified criteria.
-
-
Choose the runtime user from the Runtime User drop-down list to do a Cron discovery with different user.
Note: If the agent has default runtime user, the runtime user will be displayed in the Runtime User column, or it will be blank.
To apply the selected runtime user for all the UNIX agents, click Apply. You can override the applied runtime user of the selected agent. You can click Clear to default the runtime user.
-
(Optional). Enter the required Cron match pattern to filter the Cron expressions based on the match pattern and click Apply. You can override the applied match pattern of the selected agent. You can click Clear to clear the match pattern.
-
Choose the boxes adjacent to the UNIX nodes to choose one or more UNIX Agents and Runtime users.
-
Click Discover Cron to run the Cron discovery process.
These fields are displayed:
-
Unix Node – The UNIX agent of the Cron job.
-
Cron User – The owner of the Cron job.
-
Cron Type – The type of the Cron job includes User or System.
-
Working Directory – The home directory of the user. This home directory will be mapped to the working directory of the job.
-
Cron Expression – The expression of the Cron job.
The user with root privilege, will discover all the Cron expressions for all the users who have Cron. For the user who does not have the root privilege, the Cron expressions particular to that user, are displayed.
The color denote the specific jobs:
Red – Denotes that the particular agent is invalid during the discovery process and will be disabled.
-
Converting the Cron Expression into the TA Format
After the Cron jobs are discovered, all the Cron expressions need to be converted into the TA format.
-
Choose the boxes next to the UNIX nodes that you want to import.
-
Click Begin Conversion. The Cron expressions are converted into the TA format and the converted data are displayed which includes these fields:
-
Unix Node – The UNIX agent of the Cron job
-
Cron User – The owner of the Cron job.
-
Runtime User – The Cron User is same as the runtime user. The user can change the runtime user.
-
Cron Type – The type of the Cron job includes User or System.
-
Cron Expression – The expression of the Cron job.
-
TA Calendar Exist – The existence of the TA calendar displaying ‘Y’ or ‘N’.
-
Mapped TA Calendar – The name of the TA calendar which is mapped to the Cron expression.
This table provides the Cron Expression Mapping or Creation in TA.
Month Days
Month
Weeks
Mapped Calendar
Mapping Calendar Flow
Creation Flow
*
*
*
Daily, Weekly, Monthly with Days, Monthly with Weeks
If Daily calendar is not Identified, it checks for Weekly Calendar.
If Weekly calendar is not identified, it checks for Monthly with Days calendar.
If Monthly with days calendar is not identified, it checks for Monthly with Weeks calendar.
If no calendars are mapped while creating the calendar using the Missing Calender options, the Daily calendar gets created.
*
*
Specific Week
Daily, Weekly, Monthly with Weeks
If Daily calendar is not identified, it checks for Weekly calendar.
If Weekly calendar is not identified, it checks for Monthly with Weeks calendar.
If no calendars are mapped while creating the calendar using the Missing Calender options, the Daily calendar gets created.
Specific Day
Specific Month
*
Monthly with Days
NA
If no calendars are mapped while creating the calendar using the Missing Calender options, the Monthly with days calendar gets created.
Specific Day
*
*
Monthly with Days
NA
If no calendars are mapped while creating the calendar using the Missing Calender options, the Monthly with days calendar gets created.
*
Specific Month
*
Monthly with Weeks, Monthly with Days
If Monthly with Weeks calendar is not identified, it checks for Monthly with days.
If no calendars are mapped while creating the calendar using the Missing Calender options, the Monthly with Weeks calendar gets created.
*
Specific Month
Specific Week
Monthly with Weeks
NA
If no calendars are mapped while creating the calendar using the Missing Calender options, the Monthly with weeks calendar gets created.
Specific Day
Specific Month
Specific Week
Cannot map any calendar
NA
Can map only the existing calendar.
Specific Day
*
Specific Week
Cannot map any calendar
NA
Can map only the existing calendar.
-
-
Cron Calendar Description – The description of the Cron calendar.
-
Job Name – The name you choose for your job.
-
Job Class – The class of the job.
-
Job Group – The group of the job
-
Job Owner – The user who owns the job in TA.
-
Working Directory – The home directory of the user. This home directory will be mapped to the working directory of the job. This field is editable.
-
Job Repeat – Number of times the job repeats.
-
Job Repeat Interval – The interval between the completion of the previous job run and the beginning of the next job run.
-
Job Start Time – The time of the job when it is active.
-
Remarks – The information about the status of the job and error messages.
Note: If the Cron expression has a matching TA calendar, the TA Calendar Exist column displays ‘Y’. Otherwise, ‘N’ is displayed next to the corresponding Cron expression.
These colors denote the specific jobs:
-
Red – Denotes the jobs which have irregular job intervals and invalid Cron expressions. These jobs are disabled.
-
Yellow – Denotes that the calendar creation for this expression from this tool is not supported. You need to create the calendar manually in TA and map it. These jobs are enabled.
-
Blue – Denotes the selected rows throughout the job conversion process.
Creating the Missing Calendars
For the Cron expressions that do not map to the TA calendar, you need to create a new calendar or map to the existing calendar.
To create a calendar:
-
Choose the individual job owner of the selected Cron expression from the Job Owner drop-down list, or choose the job owner at the global header and click Apply.
-
Optionally, you can:
-
Choose the individual job group of the selected Cron expression from the Job Group drop-down list, or choose the job group at the global header.
-
Choose the individual job class of the selected Cron expression from the Job Class drop-down list, or choose the job class at the global header.
-
Click Apply.
-
-
Click Clear, to clear the selected values.
-
Click Create Missing Calendar. The Calendar Mapping dialog appears displaying the Cron Expression, Discovered Calendar, TA Calendar, Calendar Name, and TA Status.
-
Enter the name of the calendar in the Calendar Name column. From the TA Calendar column, you can choose ‘New’ to create a new calendar, or choose an existing calendar to map the Cron job to the existing calendar.
-
Choose the boxes adjacent to the Cron expression.
-
Click Create TA Calendar. A success message appears when the new TA calendar is created in the Calendar Status column.
Note: You can view the calendar and forecast details at any time from Definitions > Calendars in the TA Web Client.
-
Click Close. The parent page is updated and the TA Calendar Exist column displays ‘Y’ to the corresponding Cron expression. The Mapped TA Calendar column is updated with the created calendar name.
Validating and Importing the Cron Jobs
-
To validate the Cron Jobs before the actual import is done, click Validate Job. You can view the validation status in the Remarks column.
-
To import the jobs that are validated successfully, click Import Job.
-
To re-validate the jobs, click Re-validate Job and then import the jobs. The Cron jobs are imported successfully and saved in the TA master. You can view the list of complete Cron expressions using Back. The successfully imported jobs are disabled in the jobs list and shown in green color. You can continue to import the unconverted Cron expressions.
Importing the Cron Data
You can import the raw or formatted Cron data from your file system to TA.
-
Choose Cron Jobs > Cron Import from the Transporter Options menu. You can choose Formatted Cron or Raw Cron.
-
Click Browse on the Source side of the panel and choose the directory that contains the Cron data you want to import.
-
Choose the destination TA system from the Destination drop-down list.
-
Click Connect.
-
Click Read Data.
Note: When the formatted Cron data is loaded/read successfully, Transporter displays all the Cron jobs.
For the raw Cron data, the Cron Import dialog appears:
-
Unix Node – The UNIX agent of the Cron job.
-
Runtime User – The Cron User is same as the runtime user. The user can change the runtime user.
-
Working Directory – The home directory of the user. This home directory will be mapped to the working directory of the job.
Note: This field is editable.
To import the raw Cron data:
-
Click Import. The raw Cron data is imported successfully.
The Remarks column provides the status of the invalid Cron jobs. You can correct the invalid data or edit the values by exporting the data into a CSV file and importing the data back to the Transporter.