How to create an Autosys Job Template within WCC
search cancel

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:

  1. Create a file called 'FileWatcherTemplate.txt' with following contents:
    job_type: FW
    description: "FileWatcher Template"
    watch_file: filename.txt

  2. 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

  3. 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

  4. Run the following commands to import the 3 templates.

    1. 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

    2. 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.

    1. 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.