[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Task Scheduler won't run batch files (2008 Server)

Posted on 2012-03-20
6
Medium Priority
?
488 Views
Last Modified: 2012-04-05
Hi Experts,

I have half a dozen tasks that call batch files set up on a Windows 2008 server, and whilst the task claims to have run, the batch files are not invoked. I've checked the permissions and the shares are available to all. The only way they'll run is with an admin account permanently logged into the server, but even that's flaky! I've set the tasks to run by the NETWORK SERVICE, but still this won't work.

If I create a task on my PC (WinXP) to call the batch file on the server, it works perfectly.

Any suggestions welcome.

Thanks,

Dave
0
Comment
Question by:MrDavidThorn
[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
6 Comments
 
LVL 8

Expert Comment

by:bright12
ID: 37742848
You can create a scheduled task with the option 'Run as Admin' and give the admin username and password. If the scheduler run the program it will run it as an Admin.

I think that this will help you to solve the problem.
0
 
LVL 6

Expert Comment

by:NikolasG
ID: 37742900
Generally when trying to run batch files that require network access on 2008 server be sure to  complete the run as with a user that has access to the network shares that you need.
An other thing to try is to check run only if logged on check box but then you ll have to have an account logged on the server in order for the batch files to run.

Hope it helps.
0
 

Author Comment

by:MrDavidThorn
ID: 37742932
On Server 2008 there is the option to 'Run with highest privileges' which doesn't make a difference.

Interestingly, if I double click the batch file it runs, but if I right click and select 'Run as administrator' it doesn't run and appears to do the same as the task.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:MrDavidThorn
ID: 37742975
All the accounts I've tried have full control over the share and folders beneath, which contain the batch files. I get an error if I try and create a task without storing the password.

Is there not a way to run it as the local or network service?

Thanks
0
 
LVL 6

Accepted Solution

by:
NikolasG earned 1000 total points
ID: 37745953
Does your bat file have arguments enclosed in quotation marks?
There is a know problem about that in win 2008
http://support.microsoft.com/kb/951246
Other than that it should run normally.
Can you try to take out the quotations from your expressions in the bat file?
0
 
LVL 5

Expert Comment

by:CarlosDominguez
ID: 37746513
My recommendation is to try to call "cmd /c batchfile" in the task scheduler, instead of just calling the batch file.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

649 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