tristonyip
asked on
send notification on window sever 2003 task scheduler
hi
I am using the Windows server 2003 Task Scheduler to run a batch file, but is it possible i can get a notification if the task success?
I am using the Windows server 2003 Task Scheduler to run a batch file, but is it possible i can get a notification if the task success?
How about just have the batch file send the email? I typically have the batch file write out to a log file, and then email the log file at the end of the script. If I don't get the email, the script didn't run.
ASKER
good, how can i write a script like that, thanks
blat -server smtpservername-to address@yourdomain.com -f administrator@yourdomain.com -subject "task on %COMPUTERNAME%" status -bodyF %TEMP%\task.log
It could also help if you post your current script.
ASKER
do i need to install anything?
what did is we use winscp to put some zip file to remote sftp site, we create a bat file to do the job, we use window sever 2003 task scheduler to schedule the job.
script looks like this below
@echo off
winscp.com /script=test.txt
exit
the test.txt will move those file to sftp site
thanks
what did is we use winscp to put some zip file to remote sftp site, we create a bat file to do the job, we use window sever 2003 task scheduler to schedule the job.
script looks like this below
@echo off
winscp.com /script=test.txt
exit
the test.txt will move those file to sftp site
thanks
You only need to download bat and put it in your path. Change the values in the script to match your email addresses, smtp servername, what you want your subject to be, etc.
@echo off
winscp.com /script=test.txt > %temp%\task.log
blat -server smtpservername-to address@yourdomain.com -f administrator@yourdomain.com -subject "task on %COMPUTERNAME%" status -bodyF %TEMP%\task.log
exit
ASKER
i got server refused connection,
is it possible i can use sql server 2005 job to search the task.log and send me an email with contents?
is it possible i can use sql server 2005 job to search the task.log and send me an email with contents?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
Chris B