我正在使用 Git Bash 在 Windows 8 中运行以下脚本;手动运行时工作正常--scp、ssh 等都工作正常。但是放入任务计划程序时它不起作用。任务计划程序停止在 scp ... 不运行 scp 命令。在调度程序中,我看不到任何错误消息或错误日志(我不知道在哪里查找日志文件)。
我正在使用:以最高权限运行 UNCHECKED;为 Windows 8 配置;
Wscript.echo "Running abc.exe"
Set objShell = CreateObject("WScript.Shell")
Return = objShell.Run ("C:\abc.exe /S", 1, true)
Wscript.echo "Done Running abc.exe"
WScript.Sleep(5000)
Wscript.echo "Done sleeping"
dim fileSystem
Set fileSystem = CreateObject("Scripting.FileSystemObject")
Return = objShell.Run ("scp -i c:/users/uname/.ssh/id_dsa /c/data/*.txt admin@svr3.com:/mnt/wnd01/txt",0,true)
Wscript.echo "Uploading file, Return message " & Return
if Return = 0 then
WScript.Sleep(5000)
Wscript.echo "Done sleeping on scp"
fileSystem.MoveFile "C:\data\*.txt","C:\data\archivefiles"
Return = objShell.Run ("ssh -i c:/users/uname/.ssh/id_dsa admin@svr3.com '/opt/drupal/scripts/import_raw.sh wnd01'",0,true)
end if
Wscript.echo "Running DB script on server, Return message " & Return
任何帮助弄清楚可能发生的事情将不胜感激。