ncomper
asked on
Schedlgu.txt file, i can view it via Sched Tasks but cant see the file in Windows\Tasks
Hi All
I have a scheduled task that copies a file from one server to another, i am in the process of setting somthing up so i get an email notification when its comepleted every night,
in order for me to know if the job failed or worked i was going to read the Schedlgu.txt file to pick up the status, I can't see the physical file in Windows\Tasks folder but if i go into scheduled tasks and goto advanced view log i can view it.
Has anybody ever had this issue.
Also if anybody has any other suggestions on the best way get an email notification every time a job runs then let me know, at the moment im im thinking of a VB script that calls a cmdline smtp client.
Thanks
Nick
I have a scheduled task that copies a file from one server to another, i am in the process of setting somthing up so i get an email notification when its comepleted every night,
in order for me to know if the job failed or worked i was going to read the Schedlgu.txt file to pick up the status, I can't see the physical file in Windows\Tasks folder but if i go into scheduled tasks and goto advanced view log i can view it.
Has anybody ever had this issue.
Also if anybody has any other suggestions on the best way get an email notification every time a job runs then let me know, at the moment im im thinking of a VB script that calls a cmdline smtp client.
Thanks
Nick
The file is located directly under C:\Windows (%SystemRoot%), not under Tasks.
Why not directly using the return code of the copy job?
i.e. create a batch and run it as scheduled task:
xcopy c:\data \\remoteserver\data /s > logfile.log
if errorlevel 1 goto :SendError
Goto :EOF
:SendError
blat ... attach log file
Goto :EOF
hope it helps.
i.e. create a batch and run it as scheduled task:
xcopy c:\data \\remoteserver\data /s > logfile.log
if errorlevel 1 goto :SendError
Goto :EOF
:SendError
blat ... attach log file
Goto :EOF
hope it helps.
ASKER
thanks for that, i like the idea of doing it direct,
would it be possible based on your solution above to have it send an email if it was successful as well as sending the mail if there was an error, below i have added my script for send mail, im assuiming somehow i can add another section to call if it was successful and then add the mail script again but just change the subject in it
just not sure on the actual batch command to do that
xcopy c:\data \\remoteserver\data /s > logfile.log
if errorlevel 1 goto :SendError
Goto :EOF
:SendError
bmail -s 192.168.10.1 -t support@domain.com -f admin@client.com -h -a "HPC Oracle XCOPY Backup * DATE MUST BE CHECKED*" -m E:\HPC_Data\HPCORACLEBKP\x copy.log Please check time and date -c
Goto :EOF
Thanks
Nick
would it be possible based on your solution above to have it send an email if it was successful as well as sending the mail if there was an error, below i have added my script for send mail, im assuiming somehow i can add another section to call if it was successful and then add the mail script again but just change the subject in it
just not sure on the actual batch command to do that
xcopy c:\data \\remoteserver\data /s > logfile.log
if errorlevel 1 goto :SendError
Goto :EOF
:SendError
bmail -s 192.168.10.1 -t support@domain.com -f admin@client.com -h -a "HPC Oracle XCOPY Backup * DATE MUST BE CHECKED*" -m E:\HPC_Data\HPCORACLEBKP\x
Goto :EOF
Thanks
Nick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent, thanks for your help
Nick
Nick