Running DSA Jobs Using Crontab - BAR - Data Stream Architecture - Follow these steps to run a DSA job from Crontab, using a script.

Teradata® DSA User Guide

Product
BAR
Data Stream Architecture
Release Number
16.20
Published
November 2019
Language
English (United States)
Last Update
2019-11-27
dita:mapPath
xfr1514490991957.ditamap
dita:ditavalPath
3150_DSA_UG_1650-working-RR-new.ditaval
dita:id
B035-3150
lifecycle
previous
Product Category
Software
Teradata Tools and Utilities
You can schedule and run DSA jobs from Crontab. However, you must first create a script with specific information and create a Crontab entry.
  1. In your own directory, create a new script with the following information. Make sure the permission of this script is 755: # chmod script 755:
    • [DSA 16.20.24 or later] Java 8
      #!/bin/bash 
       
      # This will identify where BARCmdline is installed
      # If non-TMSB it will also contain the path to JAVA
      source /etc/profile.d/barcmdline-profile.sh
       
      # These will identify where JAVA is on TMSB Servers
      if [ -f /etc/profile.d/teradata-jdk8.sh ]; then
          source /etc/profile.d/teradata-jdk8.sh > /dev/null 2>&1
      fi
      if [ -f /etc/profile.d/teradata-jre8.sh ]; then
          source /etc/profile.d/teradata-jre8.sh > /dev/null 2>&1
      fi
       
      # Here specify the specific job you want to run
      dsc run_job -n <job_name>
    • [DSA 16.20.23 or earlier] Java 7
      #!/bin/bash 
       
      # This will identify where BARCmdline is installed
      # If non-TMSB it will also contain the path to JAVA
      source /etc/profile.d/barcmdline-profile.sh
       
      # These will identify where JAVA is on TMSB Servers
      if [ -f /etc/profile.d/teradata-jdk7.sh ]; then
          source /etc/profile.d/teradata-jdk7.sh > /dev/null 2>&1
      fi
      if [ -f /etc/profile.d/teradata-jre7.sh ]; then
          source /etc/profile.d/teradata-jre7.sh > /dev/null 2>&1
      fi
       
      # Here specify the specific job you want to run
      dsc run_job -n <job_name>
  2. Edit Crontab: # crontab -e
  3. Use Crontab syntax to create an entry at the beginning of the Crontab script.
  4. In the Cron entry, run the script you just created.