【发布时间】:2011-07-19 22:01:46
【问题描述】:
我写了一个批处理文件来打开一个网络浏览器,然后关闭它,然后打开另一个并关闭它。打开浏览器后,它将发送电子邮件。当我手动运行批处理时它可以工作,但是当我使用 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
对不起,如果我问错地方了……第一次在这里发帖
【问题讨论】:
-
Autosys 是否使用特殊语法来指定路径中的驱动器号?我的意思是,这条路径是否正确:
D\:\Application Tracking\text.bat?通常你会得到它就像D:\Application Tracking\text.bat(冒号前没有反斜杠)。 -
仔细检查 D "D\:..." 之后的 \ 示例: command: "C:\Windows\system32\cmd.exe /C copy C:\env.txt C:\test \env.txt"
标签: batch-file autosys