1

我写了一个批处理文件来打开一个网络浏览器,然后关闭它,然后打开另一个并关闭它。打开浏览器后,它将发送电子邮件。当我手动运行批处理时它可以工作,但是当我使用 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

抱歉,如果我问错地方了……第一次在这里发帖

4

1 回答 1

0

在 Autosys 中定义命令时,您应该在整个命令周围使用双引号转义特殊字符。你在这里都做了 - 你可能需要在所有内容周围使用双引号,因为你的命令中有一个空格,所以尝试删除冒号之前的转义字符。

于 2011-07-28T16:59:33.503 回答