Solved

Scheduled tasks not working.

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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…
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 …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

690 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