Hello Techie's
I know you are new to Autosys and want to know How to Create Job in Autosys using a jil file, Don't worry we are here with wonderful example and sample jil file.
Before going into the sample jil, you need some script to run via Autosys. you can use the sample powershell script written in our blog How to call stored procedure using powershell scripting using try and catch (vichietechie.blogspot.com) or if you have your own script, you can use that as well.
Problem Statement:
1. you need to Run particular script on sheduled time.
2. you need to know whether the script executed without errors.
2. If executed with errors the sheduled job should send notification.
Prerequisties:
1. you must have CA Workload Automation Tool installed in your machine.
2. you must know the hostname & Uid of that machine.
3. you should have script to run in autosys.
what is the difference between box and job in autosys ?
What is needed in the JIL File :
BOX Details
description:
owner:
date_condition:
days_of_week:
Start_times:
timezone:
alarm_if_fail:
send_notification:
max_run_alarm:
JOB Details
description:
machine:
owner:
box_name:
max_run_alarm:
alarm_if_fail:
send_notification:
std_out_file:
std_err_file:
command:
What will below Sample JIL File do?
You guys can edit the values as per your requirement. but remember to use the same syntax.
Sample JIL File:
description: "Weekly Archive job"
owner: "uid"
date_condition: 1
days_of_week: sa
Start_times: "17:00"
timezone: "London"
alarm_if_fail: n
send_notification:
max_run_alarm: 0
description: "Weekly Archive job which calls Stored procedure which will archive tables"
machine: hostname
owner: "uid"
box_name: archive_older_data_box
max_run_alarm: 0
alarm_if_fail: y
send_notification: n
std_out_file: "d:\logs\Autosys\%Auto_JOB_NAME%.%AUTORUN%.out"
std_err_file: "d::\logs\Autosys\%Auto_JOB_NAME%.%AUTORUN%.err"
Do you Want to Know more about autosys command ?
click Here -> Autosys commands (vichietechie.blogspot.com)
Comments
Post a Comment