Solved

Scheduled tasks not working.

Posted on 2007-11-28
4
1,726 Views
Last Modified: 2008-02-01
I have a scheduled task set to run every night at 7. The run as is set to Administrator, and the password is correct, the .bat file works when I manually run it, the following services are started, RPC, Task Scheduler, and RunAs Service. And the computer never turns off.  Not sure where to go from here.

-Chris
0
Comment
Question by:cdmt00
[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
  • 2
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
SteveGTR earned 500 total points
ID: 20367625
When you say it doesn't work, what do you mean?

Can you put some debugging code in the batch file to test where it fails?

(echo [%date%, %time%] Before this statement)>>"c:\temp\temp.txt"

this statement...

(echo [%date%, %time%] After this statement)>>"c:\temp\temp.txt"

You can change the destination and name of the debugging file from c:\temp\temp.txt if required.

One common problem of failure is attempting to use a mapped drive in a scheduled task. Use a URN instead (\\server\share\dir).

Another common problem is attempting to reference a network resource with an account that doesn't have access to the resource. This can be solved by running the account using a domain account with access to the reference.
0
 

Author Comment

by:cdmt00
ID: 20367635
so i cant use a mapped drive? that could be my problem, but It works when I run the script manually, i will try the debugging code.
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 20367678
The mapped drive is particular to the current user. Use the URN instead.
0
 

Author Comment

by:cdmt00
ID: 20367753
It looks like that might have fixed it. I will leave this question open until tomorrow because I cannot run the .bat while users are using the files. Thanks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

742 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