How to create an Autosys Job Template within WCC
book
Article ID: 49294
calendar_today
Updated On:
Products
CA Directory
CA Workload Automation AE - Business Agents (AutoSys)
CA Workload Automation AE - Scheduler (AutoSys)
Workload Automation Agent
Issue/Introduction
Description:
Example of how to create an Autosys Job Template within WCC using "Job_template" utility.
Environment
Release:
Component: ETRDIR
Resolution
Solution:
- Create a file called 'FileWatcherTemplate.txt' with following contents:
job_type: FW
description: "FileWatcher Template"
watch_file: filename.txt
- Create a file called 'JobWindowsTemplate.txt' with following contents:
job_type: CMD
command: &C\:\AutosysJobs\sleep 20
description: "Job Template Windows"
std_out_file: C\:\TempAutosys\%AUTO_JOB_NAME%_%AUTORUN%.out
std_err_file: C\:\TempAutosys\%AUTO_JOB_NAME%_%AUTORUN%.err
- Create a file called 'JobUnixTemplate.txt' with following contents:
job_type: CMD
command: /usr/bin/sleep 20
description: "Job Template Unix"
std_out_file: /TempAutosys/%AUTO_JOB_NAME%_%AUTORUN%.out
std_err_file: /TempAutosys/%AUTO_JOB_NAME%_%AUTORUN%.err
- Run the following commands to import the 3 templates.
- Windows
cd %CA_WCC_INSTALL_LOCATION%\bin
job_template.bat -u ejmcommander -p <password_ejmcommander> -g
-i FileWatcherTemplate1 C:\FileWatcherTemplate.txt
job_template.bat -u ejmcommander -p ejmcommander -g
-i JobWindowsTemplate1 C:\JobWindowsTemplate.txt
job_template.bat -u ejmcommander -p ejmcommander -g
-i JobUnixTemplate1 C:\JobUnixTemplate.txt
- Unix/Linux
cd $CA_WCC_INSTALL_LOCATION/bin
./job_template.sh -u ejmcommander -p <password_ejmcommander> -g
-i FileWatcherTemplate1 /FileWatcherTemplate.txt
./job_template.sh -u ejmcommander -p ejmcommander -g
-i JobWindowsTemplate1 /JobWindowsTemplate.txt
./job_template.sh -u ejmcommander -p ejmcommander -g
-i JobUnixTemplate1 /JobUnixTemplate.txt
Note: used option '-g' to make this template available for all WCC users
- Run the following command to list all templates.
- Windows
job_template.bat -u ejmcommander -p <password_ejmcommander> -g -l
- Unix/Linux
./job_template.sh -u ejmcommander -p <password_ejmcommander> -g -l
Note: it will only lists the own written templates and not the default templates defined by product itself after installation.
- Logout from WCC and login again.
- Go to the APPEDIT (Application Editor) tab and you will see under 'Palette' the 2 templates appearing.
Feedback
thumb_up
Yes
thumb_down
No