Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2000 Pro / XP Pro Task Scheduler prob

Status
Not open for further replies.

hollandda

IS-IT--Management
Aug 19, 2004
3
US
I am setting up scheduled tasks on the systems I support to run a .cmd script on a schedule. It only works when setting it up as the logged on user (usually my customers), whom are all admin level users. When attempting to use any other username (like the local admin account or system) it will not run. Suggestions?
 
Please be a little more specific...

What does the file do?
Is it not running at all, or are certain commands not working?
In the scheduled task, is it your belief that it only runs for the user account(s) that the end user are using, and it won' run if you specify it to run as the local administrator?

Matt J.

Please always take the time to backup any and all data before performing any actions suggested for ANY problem, regardless of how minor a change it might seem. Also test the backup to make sure it is intact.
 
A lot of people have problems with the scheduled tasks in win2k/xp and its usuall always due to user rights/password problems.

I have found that the best way to stop these problems are to create a new user to run the schedule tasks give this user as much rights as you tasks needs (usually you will give this user admin rights backup rights....enough power to do the task at hand) set a password on this user that isn't easy to guess as this user will probably have enough power to totally crash your system.

When you schedule the taks always but this users details in and run it with this user.

The reason for this is if you change password for the user with who you have scheduled the taks they wont run as the password task scheduler will be using is wrong.

Now to check logs etc you need to look under this users profile in Documents and Settings.

Good way's to trouble shot task problems is to create a batch file that does a simple task but if it runs ok you should be able to schedule anything as long as the task that you do schedule is cabable of running....

 
I've already tried creating a local admin level user on the system, and setting the task to run as this user. What I'm trying to run is a .cmd script that invokes Winzip 9 command line tool. Very simple utility that zips files from a command line. It runs perfectly fine when using the "normally logged in users" account, but it will not launch, run or do anything when I attempt to put another account against the task. But, for what it's worth, even though the script isn't running, task scheduler says it's running.
 
Right lets see

I just downloaded the winzip command line addon and created a batch file to zip files and it worked ok.

The one snag I had was it default installs in the Winzip folder which isn't part of my path so I just copied it to windows\system32 and it runs fine.

I created a scheduler user local to my machine gave it admin rights and set the password. Then scheduled the task and filled in username and password. Note even if its a local user you should type the user name like COMPUTERNAME\username or if its a domain user DOMAINNAME\username

If I understand you correctly you have already tested to manually run the batch file and it works for everyuser?
 
What I'm trying to do is create a task in Task Scheduler that invokes a CMD script which contains code to invoke the winzip command line tool. I don't think it's relevant what the CMD script is doing --- I just need the CMD script to run as a scheduled task.

It only works if I go to the end users system, and (with them logged in) set it to run with their account/password. They are using a domain account. This would be ok, except that when the end user is forced to change the password on their domain account, the task stops working.

If I try to do this same thing but using a local account (admin level of course) it won't work. Task scheduler shows it as running, but no CMD script is running (it would be very obvious if it was).

I think what I'm seeing here is another bad limitation of Task Scheduler.

 
The Microsoft link works for me with the exception that I'm scheduling a task for ROBOCopy to backup a NAS drive to a local drive. The task fails unless I'm logged on. When I log off, the task runs but fails to find the source drive. Is there a way to keep the drive mappings when no one is logged on? Is it possible to keep the light on in the refrigerator when the door is closed?
 
I'm guessing that the task fails when not logged on due to drive letter mapping assignments. Can you set ROBOCopy to access the NAS drive by UNC - \\servername\sharename - instead of drive letter? Alternatively, can you create a batch file to run as the scheduled task? The batch file could set the drive letter mapping with a 'net use' command, then run ROBOCopy.

The refrigerator problem......I think so, but I can't tell if it works.
 
Thank you, the UNC is all that was needed. Easy enough.

The fridge light is much more complicated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top