?
Solved

Scheduled tasks not working.

Posted on 2007-11-28
4
Medium Priority
?
1,728 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

771 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