Scheduled Task issue
Hi All,I created a batch for stop Print Spooler Service on my Windows Server 2003. I put this batch on a Scheduled Task and this is configured to run with a domain user (admtasks) account (is not part of Local Administrator Group of IIS Server).From Server I logged with Administrator Account and I forced to run the task, but nothing happens (Sheduled task run, but seems batch don´t run)when admtasks is logged remotely, I force to run the task and works (print spooler service is stopped). Also work if admtasks is on Local Administrator Group, but for security reasons admstask mustn´t be on Local Administrator Group.Any Ideas?Regards.
January 22nd, 2010 10:38pm

Hi Jose, According to your description, I understand that the scheduled Task did not run when a administrator account logged in. This issue might be caused by account permission issue. To narrow down the issue, please ensure the following steps: 1. Check if the task application runs under a path where log on user (admtasks) has the proper permission. If not, you may add a command line like "CD c:\users\admtasks\desktop" at the beginning of batch file to start application. 2. Make sure the account (admtasks) to run task scheduler is in group "log on as batch job" rights (server side). Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights Assignments"Log on as a batch job" If the issue persists, You can add a "pause" into your batch file to monitor the scheduler task processing. For more information Scheduler Task troubleshooting, you can refer to: How to troubleshoot scheduled tasks in Windows XP and in Windows Server 2003 http://support.microsoft.com/kb/308558 Sincerely,Wilson JiaThis posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
January 25th, 2010 10:37am

Hi , Inline to wilson suggestion , i am confused with the behavior ."when admtasks is logged remotely, I force to run the task and works (print spooler service is stopped)."You mean to say when you login with admtasks locally , the task doesnt run but when you execute it remotely it works ??
January 25th, 2010 12:41pm

Hi Wilson,When only Administrator is logged in, the scheduled task run (there isn´t any error like "could not start"), but batch doesn´t run.when Administrator is Logged in and also admtasks is Logged in, the scheduled task run and batch file run, so the print spooler service stop.Scheduled task works, but batch doesn´t work if admtasks is not logged in.Admtasks has the right "Log on as a Batch Job", after that test I put admtasks on Administrator local group and batch file works if admtasks is logged in or not.Any Ideas?.Regards.
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2010 9:20pm

Hi Sainath,I mean this:When only Administrator is logged in, the scheduled task run, but batch doesn´t run. There isn´t any error like "could not start" on Scheduled Task Windows, Also there isn´t any error on Scheduled Task Log, thats why i sais Scheduled Task run and batch file seems to run, but doesn´t run.when Administrator is Logged in and also admtasks is Logged in, the scheduled task run and batch file run, so the print spooler service stop.Scheduled task works, but batch doesn´t work if admtasks is not logged in.Admtasks has the right "Log on as a Batch Job", after that test I put admtasks on Administrator local group and batch file works if admtasks is logged in or not.Any Ideas?.
January 27th, 2010 9:28pm

Hi Jose,Please try to add a "Pause" at the end of your batch file. When only Administrator is loggged in, you may verify what's exactly happened in the batch file processs.Regards,Wilson JiaThis posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2010 4:48am

Hi Wilson,I add pause, but nothing happens,it seems that sheduled task works if just user account (admtasks) that the batch job runs under is logged.Regards.
January 28th, 2010 8:01pm

Let's have a look at the batch.Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows]
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2010 8:15pm

Hi Dave,this is batch:net stop spooler > c:\tools\result.txtAs I said sheduled task works if just user account (admtasks) that the batch job runs under is logged.If admtasks is on Local Administrator Group the scheduled task works, but I can't add admtasks users on Local Administrator Group by security reasons.Regards.
January 28th, 2010 11:15pm

That's why it doesn't work because your user doesn't have permissions to stop services.This article may help.How to grant users rights to manage services in Windows Server 2003http://support.microsoft.com/kb/325349Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows]
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2010 12:36am

HI Dave,Admtasks has already has that right.By GPO I addred rights to admtasks for start and stop spooler service, also i verified that admtasks can stop and start print spooler service.Regards.
January 29th, 2010 1:06am

If you change fromnet stop spooler > c:\tools\result.txttonet stop spoolerdoes it work?Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows]
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2010 1:14am

I tried that and doesn´t work.Regards.
January 29th, 2010 1:40am

Round-about seems to be a desktop creation problem. There's a limit in Windows as to how many services you can have running under user accounts. It has to do with a type of memory call "Desktop Heap" The hard limit is 48MB. This article explains it somewhat and might be your issue.http://support.microsoft.com/default.aspx?scid=kb;[LN];184802Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows]
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2010 1:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics