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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now