Discussion Locked

Windows NT4 and Failing AT Jobs

0 helpful
14 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have two scripts that I have scheduled using AT on an NT4 Server. One Script is scheduled to shutdown a database and its related services, while the other is set to restart the database and its services. My question is, why is it that I can run the close script manually and in the AT scheduler just fine, but I can only run the starting script manually and it does nothing in the AT Scheduler when it is supposed to be executed?

Any help woudl be appreciated as I have encountered before withno answer.

14 replies

by chaubner

Did not help because it was asking for more info. I added info requested after the fact. Sorry for the delay.

by chaubner

The command line is as follows:

Startup:
AT 13:00 /EVERY:m,t,w,th,f "C:\shutdown.bat"

Shutdown:
AT 13:30 /EVERY:m,t,w,th,f "C:\startup.bat"

by don christner

Without knowing exactly what your batch files do I can only take an educated guess at what the problem is. I think that perhaps a step in the batch file requires the successful completion of a previous step. Can you put checks in the batch file after each step and then a pause to verify each step?

Another possibility is that when you run it manually it is using your permissions. When it runs from the AT command it could have different perms.

Don

by phillip_hansen

Chaub,

I need more info; email shutdown.bat and
startup.bat to phillip_hansen@hotmail.com, if your company's policies permit it. Perhaps I can help.

Phillip Hansen

by tamj123

Make sure the user account with all the permissions and rights you want the schedule service to have. It must be a member of the Administrators group and have the right to log on as a batch job and as a service (advanced rights). It must have a non-blank, non-expiring password.

by jwildwind

If possible, could you list your bat files?
A couple of side notes:
1)If you are running IE 5 and above, there's a new scheduler installed called "Scheduled Tasks" in "My Computer".
This allows you to enter an account that the service will run under.
2)There's an updated WINAT.exe on the Microsoft support web (not sure of exact URL).

by nazir

Hello Chaub, I just posted the same question which does exactly the same before I saw yours. Reading your command line, I noticed something which is missing. I am not sure it will work, as It hasn't at my computer. But I will explain.
You should precede your command file(the one in quotes) with cmd /c, whci means the any batch or comand file which is not executable i.e not .exe should have that prefix, according to the manual.
Back to my comparison with my problem is that I am trying to shutdon the database every nite and stop it in the morning so that the IT-dept can take backup of the files. I have run manually the scrips and result s were ok. I have run same scripts on my home machine with win 2000 and results were Ok, and timing was perfect but not on the NT at work. Here is the command I am using:
1. at 23:00 /every:M,T,W,Th,F,S cmd /c "c:\bat\pts_shut.cmd > c:\bat\shut.dat"

The second command has start keywords instead of shut as above. The redirect operator is to see whathappened as Win Nt won't bring up the window. They have refused to run up to now but on Win2000 they have run. I would suspect therefore that theupgrade is answer(some one told you about WINAT.exe). But AT has trouble, at least at my computer.

Nazir

This discussion is closed to new replies.