Windows Scheduler fails to execute batch file.

525 pts.
Tags:
Authentication
Batch files
Microsoft Windows Server 2003
NTBackup
Windows Scheduler
The Problem: I have a batch file that I am attempting to run once a week, using Windows Scheduler. The file is hosted locally on my "Dropbox" server, and the purpose of the batch file is to map the Z: drive to a remote PC, run NTBackup on Dropbox to reach out to the remote PC and back up their Outlook data folder to Dropbox, then disconnect the Z: drive and copy the NTbackup log file to another location. The batch file itself, if run manually from the Dropbox server, executes flawlessly each time. I have confirmed this with numerous tests. I set up Windows Scheduler on the Dropbox server, to schedule this batch file to run every week at a certain time. When I came back the next day and checked, it had not executed. In the Windows Scheduler screen itself, the Status of the job in question was "Could not start". The Last Result was 0x0, but I have also seen them show up 0x2 as well. I then went into the Windows Scheduler log file, and found the following entry: 13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST) "BrianW-OutlookBackupJob1.job" (brianw.bat) 11/18/2008 2:09:24 PM ** ERROR ** The attempt to log on to the account associated with the task failed, therefore, the task did not run. The specific error is: 0x80070569: Logon failure: the user has not been granted the requested logon type at this computer. Verify that the task's Run-as name and password are valid and try again. 13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST) I have repeated this experiment on 4 total machines, on various floors, with the same result each time. Here are the specifics about the situation: 1) The source server (on which NTBackup is running, Scheduler is set to run, and the batch files are stored) is running Windows 2003 Server. 2) The destination PC (where the email backup files reside that are being captured) is running Windows XP Pro, SP3. 3) Both boxes are on the exact same subnet, there are no firewall rules separating them. 4) I am the Domain Admin, and as such I am logged into Dropbox for this experiment as myself. All machines in question are on the Domain, and I have personally verified that all machines have Domain Admins set as local administrators on the machine in question. Therefore, I have local administrator privileges on all the machines involved. 5) When I set up the Scheduler jobs, I used my domain account as the authentication account. This is because the batch file in question maps a network drive from the server, to the destination PC, and my Domain login has the credentials to do so. As such, I made sure that Dropbox server is logged in as the same account (mine). I have verified that I have the user name and password correct in the Run As screen for the task. In addition, the first of the four machines on which I ran this test is my own PC. Again, the batch files run flawlessly when executed manually, therefore the problem must lie with Scheduler. What am I possibly missing here, for these to fail? 13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)13:27, 18 November 2008 (CST)[[User:Lonewolfbw|Lonewolfbw]] 13:27, 18 November 2008 (CST) I can post the batch file if it's necessary, but I don't believe it should be, as it works just fine on its own. It seems to be a problem unique to Scheduler.

Answer Wiki

Thanks. We'll let you know when a new response is added.

This right is granted through the Local or Domain Security Policy on Windows 2000, XP, and Server 2003. To do this using the Local Security Policy, follow these steps.

1. In the Control Panel, open Administrative Tools, then Local Security Policy.
2. Beneath Security Settings, open Local Policies and highlight User Rights Assignment.
3. Locate Log on as a batch job. Open the properties and add any users that need this right.
4. When finished, save your changes and close the Local Security Settings window.

Your changes should take effect right away. To make changes to the Domain Security Policy, make these changes on a domain controller using the Domain Security Policy Control Panel utility.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Technochic
    In the scheduler window, what do you have in the "run" field? Do you have a check in the box "Run only if logged in" and does the task run while you are logged in?
    57,010 pointsBadges:
    report
  • Lonewolfbw
    The Run field is configured with my domain login: (for example: ) DOMAINBrian and the password for that account as well. As mentioned previously, I am the domain administrator. I do not have "Run only if logged in" checked, as I did not wish to make that a requirement. Although for the purpose of this test, I Have remained logged into the box the entire time. The task attempts to run while I am logged in, yes. But the results are what I noted above, the failure message about the password. I have verified that all machines in question allow Domain Admins to be local admins, and that my password is correct.
    525 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following