使用 Crontab 运行 DSA 作业 - BAR - Data Stream Architecture

Teradata® DSA 用户指南

Product
BAR
Data Stream Architecture
Release Number
17.20
Published
2022 年 3 月
Language
中文 (简体)
Last Update
2022-04-14
dita:mapPath
zh-CH/bis1632417576364.ditamap
dita:ditavalPath
zh-CH/vwp1576617377804.ditaval
dita:id
B035-3150
Product Category
Software
Teradata Tools and Utilities
可以通过 Crontab 计划和运行 DSA 作业。然而,必须先使用特定信息创建脚本,并创建 Crontab 条目。
  1. 在您自己的目录中,使用以下信息创建新脚本。请确保此脚本的权限为 755: # chmod script 755:
    #!/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>
  2. 编辑 Crontab:
    # crontab -e
  3. 使用 Crontab 语法在 Crontab 脚本的开始处创建条目。
  4. 在 Cron 条目中,运行您刚刚创建的脚本。