Troubleshooting AT Command Using /k Switch

Last reviewed: November 14, 1997
Article ID: Q142040
The information in this article applies to:
  • Microsoft Windows NT Workstation versions 3.5, 3.51, and 4.0
  • Microsoft Windows NT Server versions 3.5, 3.51, and 4.0

SUMMARY

One way to troubleshoot a batch job that is scheduled to run using the AT command is to type the following at the MS-DOS command prompt:

   AT <xx.xx> /interactive cmd.exe /k

   where <xx.xx> is the time in hours and minutes.

Using the Windows NT Resource Kit utility Soon.exe, this command can be simplified even further to run within the next 5 seconds automatically:

  SOON /interactive cmd.exe /k

Both of these commands open the MS-DOS command prompt at a scheduled time and allow you to manually run the batch job.

If an MS-DOS command prompt does not open, then launch the Control Panel Services applet and check to see if the Schedule service is started. Click the Startup button and make certain that the System account is selected; only the system account can interact with the desktop. Network connections made under the System account use a null session for credentials, so it may be necessary to supply a user name and password for commands such as NET USE.

Before running your batch job, type the command "SET" in order to understand the environment that the command scheduler is running under; all environmental variables including the user name will be listed.

MORE INFORMATION

The AT command syntax above allows you to troubleshoot situations where a batch job runs successfully when it is executed from the command line, but it does not work when you execute it using the AT command.

In addition to troubleshooting the batch job, do the following:

  1. Include the ECHO and PAUSE commands in your batch file so that you can narrow down the cause of the problem.

  2. When you use the AT command, make sure you are using the correct schedule service account. In the Control Panel Services applet, verify the "Log On As" account for the Schedule service. This account determines whether the task scheduled to run has access to the network or the local computer.

  3. Determine if the task requires interaction with the desktop. If so, use LocalSystem for the Schedule service. However, this means that network connectivity is not available unless you type the following at the command line:

    NET USE \\<server name>\<share name> /U:<domain>\<user name> <password>


Additional query words: tshoot scheduler winat
Keywords : NTSrvWkst ntutil kbtshoot
Version : WinNT:3.5,3.51,4.0
Platform : winnt
Issue type : kbtshoot


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.