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,060 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

808 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