Solved

Schedlgu.txt file, i can view it via Sched Tasks but cant see the file in Windows\Tasks

Posted on 2008-06-23
5
3,104 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:ncomper
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:Michael Pfister
ID: 21854667
The file is located directly under C:\Windows (%SystemRoot%), not under Tasks.
0
 
LVL 28

Expert Comment

by:Michael Pfister
ID: 21854692
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.
0
 
LVL 5

Author Comment

by:ncomper
ID: 21855000
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\xcopy.log Please check time and date -c
Goto :EOF


Thanks

Nick
0
 
LVL 28

Accepted Solution

by:
Michael Pfister earned 500 total points
ID: 21855040
Could be done this way:

xcopy c:\data \\remoteserver\data /s > logfile.log
if errorlevel 1 goto :SendError
bmail -s 192.168.10.1 -t support@domain.com  -f admin@client.com -h -a "HPC Oracle XCOPY Backup *OK*" -m E:\HPC_Data\HPCORACLEBKP\xcopy.log Please check time and date -c
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\xcopy.log Please check time and date -c
Goto :EOF

Hope it helps
0
 
LVL 5

Author Comment

by:ncomper
ID: 21855698
excellent, thanks for your help

Nick
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Learn about cloud computing and its benefits for small business owners.
Know what services you can and cannot, should and should not combine on your server.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question