我有一套脚本。我已经在本地实现了自动化,使用Python运行这些脚本。因为我是新的tp Python,也不知道Autosys。我的要求是从VM自动化这些脚本集,以便这些作业每天在Autosys上作为批处理作业运行。如何做到这一点?
发布于 2020-07-09 01:44:11
伙计,你需要描述你所处的阶段。
考虑一种理想的情况,在linux机器上,预计脚本(python/shell/perl)将根据特定时间或在前一个脚本成功后运行。在Autosys中,您可以使用condition定义作业。一旦条件为真,它将触发指定的命令。
考虑一下,您希望在每天上午8点执行一个python脚本/absolute_path/hello.py。在这里,我将使用JIL文件定义我的Autosys作业,如下所示:
insert_job: HELLO_WORLD JOB # Job Name
job_type: CMD # A command job
command: python /absolute_path/hello.py # Execute the python script
owner: xyz # User through which the script would execute
machine: localhost # Hostname / DNS name of the node
date_conditions: 1 # Boolean to follow time condition or not
days_of_week: all # Run everyday
start_times: "08:00" # Time of runhttps://stackoverflow.com/questions/62736977
复制相似问题