Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
3,188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

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

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 29

Accepted Solution

by:
Michael Pfister earned 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

721 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