Solved

Scheduled tasks not working.

Posted on 2007-11-28
4
1,719 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
  • 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 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

16 Experts available now in Live!

Get 1:1 Help Now