Troubleshooting AT Command Using /k Switch

Article translations Article translations
Article ID: 142040 - View products that this article applies to.
This article was previously published under Q142040
Expand all | Collapse all

SUMMARY

You can use the /k switch with the AT command to troubleshoot a scheduled batch job. The /k command allows you to manually run the batch job. To do so, type the following command at the MS-DOS command prompt, where xx:xx is the time in hours and minutes:
at xx:xx /interactive cmd.exe /k
When you use the Windows Resource Kit utility Soon.exe, you can simplify this command so that it runs in the next 5 seconds automatically. To do so, type the following command at a command prompt:
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, start the Services tool in Control Panel, and then confirm that the Schedule service is started. Click the Startup button, and then confirm 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; therefore, you may have to supply a user name and password for commands such as net use.

Before you run your batch job, type the set command. When you do so, all environmental variables including the user name are listed. This command helps you understand the environment that the command scheduler is running in.

MORE INFORMATION

When you run the AT command line that is described in the preceding section, you can troubleshoot situations where a batch job runs successfully when it is executed from the command line, but it does not run 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 the cause of the problem.
  2. When you use the AT command, make sure you are using the correct schedule service account. To do so, start the Services tool in Control Panel, and then confirm that you are using the "Log On As" account for the Schedule service. This account determines whether the task that is 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, when you do so, network connectivity is not available unless you type the following the command line:net use \\server name\share name /U:domain\user namepassword

Properties

Article ID: 142040 - Last Review: February 20, 2007 - Revision: 2.2
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows NT Workstation 3.5
  • Microsoft Windows NT Workstation 3.51
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 3.5
  • Microsoft Windows NT Server 3.51
  • Microsoft Windows NT Server 4.0 Standard Edition
Keywords: 
kbtshoot KB142040

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com