AutoSys 调度程序更新 JIL
我们使用 AutoSys 进行作业调度,我发现自己编写了很多 JIL(作业指令语言)脚本来删除框并由于小的作业更改(例如开始时间等)而重新插入它们。有没有可以使用的更新命令? CA 的 AutoSys 备忘单 没有相关信息。
We use AutoSys for job scheduling, and I find myself writing a lot of JIL (job instruction language) scripts to delete boxes and re-insert them due to small job changes (e.g. start time, etc.). Is there an update command that can be used? CA's AutoSys cheat sheet has no information on one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
是的,
就是 update_job: 属性。
将框 BOX_A 开始时间从 14:00 更改为 15:00 的示例
将其保存到文件中并使用 jil < 运行它文件名.jil
Yes,
It is the update_job: attribute.
Example to change the box BOX_A start time to 15:00 from 14:00
Save this into a file and run it using jil < filename.jil
直接从 jil CLI 输入命令时可能需要考虑的一件事是,必须在完成命令后写入该退出。否则它可能不会生效。这件事几天前就发生在我身上。
所以,如果你在 JIL 中输入了命令并且没有生效,请尝试在提示符末尾写 exit 。类似于:
One thing which you might need to consider while entering your commands directly from jil CLI, That exit has to be written after finishing your commands.Otherwise it might not take effect. This happend with me few days ago.
So,If it happend that you entered the commands in JIL and it didnt take effect , try writing exit at the end of the prompt.Something like :
您可以使用 UPDATE_JOB。请注意,如果您使用此命令并且您的更新是删除 start_times(而不仅仅是更新它),那么您将对 update_job jil 执行的操作是仍然包含 start_times 条目但不指定任何值。请参阅下面的示例:
上述内容将删除作业的 start_times 。如果您只是删除更新 jil 中的 start_times,则 start_times 将不会更新,并且仍保留在 jil 中。
You can use the UPDATE_JOB. Take note that if you use this and your update is to remove the start_times (instead of just updating it), what you are going to do with your update_job jil is to still include the start_times entry but specify no value. See sample below:
The foregoing will remove the start_times of the job. If you just remove the start_times in your update jil, the start_times will not be updated and it will still remain in the jil.
更新工作:YOUR_JOB_NAME
开始时间:04:00
update_job: YOUR_JOB_NAME
start_times: 04:00
伙计们,如果您有兴趣,您可以创建一个 autosys 作业来更新另一个作业。以下输出可以放置在 jil 文件中以创建 autosys 作业,该作业启动后将从每周运行 7 天的作业中删除 sa。我有许多数据库作业,有时不需要在构建周末(即星期六)运行。
Guys if you are interested you can create an autosys job to update another job. The below output can be placed in a jil file to create a autosys job that when started will remove sa from a job that runs 7 days a week. I have many database job that occasionally during need not to run during a build weekend ie on saturday.
我了解更新的作用,并且您可以更新许多其他属性。上面的示例不需要您创建 jil 文件来执行更新。
我上面的示例适用于用户需要执行此操作以进行临时维护的场景。因此,在这种情况下,他们会创建一个维护箱,其中包含可能需要打开和关闭作业上某些 autosys 属性的作业。我发现很容易看到盒子里的所有东西,然后你可以创建另一个工作来把东西放回去。
没有多少人知道您可以从图形界面运行 update jil 命令。
您所要做的就是在命令行中指定它
I understand what the update does and that you can update many other attributes. The above example doesn't require you to create a jil file to perform the update.
My example above is for a scenario whereby a user needs to do this for mainteneance adhoc. So in that instance they create a maintenance box with the jobs in it that may be required to switch on and off certain autosys attributes on jobs. I find it easy to see everything in a box and then you can create another job to put things back again.
Not many people know that you can run an update jil command from the graphical interface.
all you have to do is specify this in the command line
AutoSys 允许您添加、修改和添加内容。删除作业名称具有以下属性的作业。
插入作业:JOB_NAME
-->需要根据所选的工作类型提供其他子属性。update_job:JOB_NAME
-->只需要修改需要修改的子属性即可。如果要删除一个值,则应将值替换为单个空白,并且需要用新值替换修改。某些子属性依赖于其他子属性,例如start_times
仅当date_conditions
设置为 TRUE 或 FALSE 时才会生效。删除作业:JOB_NAME
-->不需要其他子属性AutoSys allows you to add, amend & delete the job with below attribute for job name.
insert_job: JOB_NAME
--> Need to provide other sub attribute as per job type selected.update_job: JOB_NAME
--> Only need the sub attributes which need to amendment. If one want to remove one then value should replaced with single blank and amendment need to be replace with new value. Some of the sub attributes are dependent on others sub attribute such asstart_times
will take effect only whendate_conditions
has been set to either TRUE or FALSE.delete_job: JOB_NAME
--> No other sub attribute is needed