autosys 不运行批处理文件
我编写了一个批处理文件来打开一个网络浏览器,然后关闭它,然后打开另一个浏览器并关闭它。打开浏览器后,它会发送电子邮件。当我手动运行批处理时,它可以工作,但是当我使用 autosys 运行它时,电子邮件从未发送。这是批处理文件:
@echo off
start iexplore.exe http://localhost/licensedb/Dev/home.php
ping 123.45.67.89 -n 1 -w 20000 > nul
taskkill /im iexplore.exe
start iexplore.exe http://localhost/licensedb/Dev/send_mail.php
ping 123.45.67.89 -n 1 -w 10000 > nul
taskkill /im iexplore.exe
这是 autosys 命令行:
insert_job: cots_license_tracker job_type: c
command: "D\:\Application Tracking\text.bat"
machine: computer name
owner: serviceautosys@domain
permission:
date_conditions: 1
run_calendar: Bi-weekly_Mondays
start_times: "09:00"
std_out_file: D\:\logs\AutoSys\sys\%AUTO_JOB_NAME%.out
std_err_file: D\:\logs\AutoSys\sys\%AUTO_JOB_NAME%.err
alarm_if_fail: 0
抱歉,如果我问错地方了...第一次在这里发帖
i wrote a batch file to open a webrowser, then close it, then open another and close it. upon opening the browser it will send email out. when i manually run the batch it works, but when i use autosys to run it, email never got sent. here's the batch file:
@echo off
start iexplore.exe http://localhost/licensedb/Dev/home.php
ping 123.45.67.89 -n 1 -w 20000 > nul
taskkill /im iexplore.exe
start iexplore.exe http://localhost/licensedb/Dev/send_mail.php
ping 123.45.67.89 -n 1 -w 10000 > nul
taskkill /im iexplore.exe
Here's the autosys command line:
insert_job: cots_license_tracker job_type: c
command: "D\:\Application Tracking\text.bat"
machine: computer name
owner: serviceautosys@domain
permission:
date_conditions: 1
run_calendar: Bi-weekly_Mondays
start_times: "09:00"
std_out_file: D\:\logs\AutoSys\sys\%AUTO_JOB_NAME%.out
std_err_file: D\:\logs\AutoSys\sys\%AUTO_JOB_NAME%.err
alarm_if_fail: 0
Sorry if I asked in the wrong place... first time posting here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Autosys 中定义命令时,您应该在整个命令周围使用双引号或转义特殊字符。您在这里同时执行这两项操作 - 您可能需要在所有内容周围使用双引号,因为您的命令中有空格,因此请尝试删除冒号之前的转义字符。
When defining the command in Autosys, you should either use double quotes around the entire command or escape special characters. You are doing both here - you probably need to use double quotes around everything since there is a space in your command, so try removing the escape character before the colon.