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

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

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

Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month4 days, 17 hours left to enroll

636 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