running a ssh connection into batch file

G

Guest

I have a Batch file to use ssh connection. So When I run the batch file
manually its works fine, but when I schedule it on schedule tasks it doesnt
work.

Help me please
 
P

Pegasus \(MVP\)

jdonaldo said:
I have a Batch file to use ssh connection. So When I run the batch file
manually its works fine, but when I schedule it on schedule tasks it doesnt
work.

Help me please

Modify your batch file as below, schedule it, then have
a look at the two output files and all will become clear!

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
*** Insert your SSH command here*** 1>>c:\test.log 2>c:\test.err
echo ErrorLevel of SSH=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top