Link to home
Start Free TrialLog in
Avatar of Exia
ExiaFlag for United States of America

asked on

Vista Task Scheduler Not Working Properly

A few of my users have recently switched from XP to Vista Business and they are having problems with their scheduled tasks.  We went into each persons's PC, went to the task scheduler, and created a couple of scheduled tasks.

The tasks appear to run when they are supposed to, but nothing actually happens (I see nothing run on their screens, and no output files are created from these batch files).  The batch files that are scheduled to run work perfectly if run manually, but the scheduler can't seem to do it.

All of the tasks have a "Last Run Result" of (0x1).  If I look at a task closely and check the history log for it, all of these show at the same second.  

For example, I ran one manually a few minutes ago, and all of these were tagged showing 10:18:01 AM:

10:18:01 AM - Event 110 - Task triggered by user
10:18:01 AM - Event 100 - Task Started
10:18:01 AM - Event 319 - Task Engine received message to start task
10:18:01 AM - Event 200 - Action started
10:18:01 AM - Event 129 - Created Task Process
10:18:01 AM - Event 201 - Action completed
10:18:01 AM - Event 102 - Task completed

As for properties, I have made sure that "Run whether user is logged on or not" is selected, as well as "run with highest privileges".  I have tried running these user a domain administrator (also a local administrator) account as the account to run the tasks with.  I read a suggestion somewhere to change the AT Service Account from "system account" to an administrator user (and put in the proper password), which I did, and still had no luck.

These are pretty basic batch files, and they run great if told to run manually.  Just when task schedules gets it's hands on them - bad things happen.  Well, nothing happens actually.

Any ideas?  Thanks in advance!
Avatar of johnnash1180
johnnash1180
Flag of India image

What is the type of actions done by your batch file? Does it do any network related operations?

Try add some debugging code, such as write some content about the status to a text file, for trace the execution of the batch file. And check that text file, what it does.

Avatar of Exia

ASKER

The batch file itself runs from a shared network drive that is mapped on the user's PC.  It also accesses files on several mapped drives during its process.

I'll try doing a scheduled task for a simple batch that runs locally and see if I can figure out anything on this.

I'm not really sure what you mean by adding debugging code.  Could you give me an example or something to add (code-wise) that would help me possibly identify where my problem is coming from?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of johnnash1180
johnnash1180
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Exia

ASKER

"Ok, the mapped network drives are not accessible for the applications runs as service. Note that, Windows scheduler is running as service, and hence the mapped network drives are not accessible."

What if the batch files themselves are run from a mapped drive?  The batch files are run by several people, and thus are stored on a shared drive instead of locally on their PCs.  Is there no way to get it to work in that situation?

I can easily add a net use command to map drives a the beginning of the batch file, but if the batch file itself is stored on a mapped drive, then it wouldn't be able to access the batch to begin with - correct?
Avatar of Exia

ASKER

Ok, I took your advice about the net use portion of the batch files and actually made some batch files locally on people's PCs.  These files were basically the initial net use drive mapping commands, then a command to run the actual batch file I wanted to run (the one that I couldn't run from the shared drive).

This seems to be working.