Link to home
Start Free TrialLog in
Avatar of yongsing
yongsing

asked on

"AT" batch job not running as scheduled

I'm trying to use the AT command to schedule some jobs. Although I am able to schedule them, the jobs do not seem to run at the schduled time. As an experiment, I tried to schedule the PC to run the 'telnet.exe' program:

at 16:18 /every:m,t,w,th,f,s,su test.bat

Inside the test.bat file:

c:
cd\winnt\system32
telnet.exe

On typeing 'AT' again, I can see that the job is scheduled:

Status ID   Day                     Time          Command Line
--------------------------------------------------------------------------
       11   Each M T W Th F S Su    4:18 PM       c:\test.bat

However, when the time came, the batch file didn't seem to be run. The telnet window should pop up if the batch file is run.

Why doesn't it run?
Avatar of Nenadic
Nenadic
Flag of Serbia image

You have to put the command in quotes: "test.bat"
Avatar of yongsing
yongsing

ASKER

I put it in quotes as you suggested:

at 16:44 /every:m,t,w,th,f,s,su "c:\test.bat". It still ends up the same:

Status ID   Day                     Time          Command Line
-------------------------------------------------------------------------------
       11   Each M T W Th F S Su    4:18 PM       c:\test.bat
       12   Each M T W Th F S Su    4:44 PM       c:\test.bat

It didn't run at the scheduled time. By the way, what is 'Status' supposed to be?
Just the number of the scheduled job, so you can use that to delete it.

Is your Scheduler Service running?
Check Event View for answer.
>> Just the number of the scheduled job, so you can use that to delete it.

You're referring to 'ID'. What's 'Status' then?

>> Is your Scheduler Service running?

It is running, of course. Otherwise, when I execute AT, it will say something like service not started.

>> Check Event View for answer.

Event Viewer? I checked, but there are no entries which is relevant to my problem. In fact, there is only one entry for the whole of today, from the sourse 'Rdr'. It's not caused by the scheduled batch jobs.
I was using AT command to run a batch job (download latest virus identities) on a daily basis and it wouldn't. I thought it was because there was no user/password specified - and nowhere on the command line to specify one.

Anyway after struggling for a while trying to solve it, I upgraded to IE5 which also installs a better scheduler (in my opinion). This lets you setup jobs in a window rather than command line, and you can specify a username and it's password. My job now runs every day.

If for some reason you really need to use AT commands this might not help, but if you don't care then upgrade the scheduler.


Mike.
try
at 16:18 /every:m,t,w,th,f,s,su test.bat /interactive

if i remember right (at home on a win98 machine) tasks started by the at command by default run in the background.



>> try
>> at 16:18 /every:m,t,w,th,f,s,su test.bat /interactive

It's still the same!

guernseypost:

With IE5, where's the window that lets you set up jobs? Is it inside IE5? I can't find it. I have IE5 on this machine which fails with AT. In the Services of Control Panel, I see 'Task Scheduler'. On another PC with an older version of IE, it is 'Schedule'.
No, yongsing. If you installed IE5 directly, the Task Scheduler won't appear. You need to install IE4 first to show the task scheduler. But the AT command won't be affected from IE. Try make a AT command today and schedule the task to do something tomorrow. Like this:
Suppose today is Thursday:
at 13:00 /every:m,t,w,th,f,s,su test.bat

test.bat:
makedir test
>>  If you installed IE5 directly, the Task Scheduler won't appear. You need to install IE4

I have 'Task Scheduler' in the Services window. I don't think I have installed IE4 before. Anyway, what's the difference? Is there a window somewhere that I call up to set up jobs?

>> Try make a AT command today and schedule the task to do something tomorrow. Like this:
>> Suppose today is Thursday:
>> at 13:00 /every:m,t,w,th,f,s,su test.bat

That's what I've been doing (see my original post)! I'm telling you that the job is not running.

Is there any alternative beside using AT? Any freeware around that I can download that does the same thing as AT?
It's working. I didn't realized it until I opened up Task Manager and saw that I have a couple of Telnet.exe in it. It seems that any program with a GUI won't appear at all, regardless of whether I put '/interactive' or not. Everything runs in the background, and that's why I didn't know.

On another PC, the Services window shows 'Schedule' instead of 'Task Scheduler'. When a scheduled job is run in that PC, Task Manager doesn't show anything at all. I won't know that it has run, until I check the database changes the program made.

Now that my problem is solved, I don't really know who I should give the points to.
ASKER CERTIFIED SOLUTION
Avatar of schmiegu
schmiegu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I installed IE 5.5 on a PC which only has IE 2.0. After installing, I found that Task Scheduler is still not there. There wasn't an option for this during installation. The strange thing is that, on another PC, I installed IE 5.1 on its IE 2.0, and Task Scheduler appears. Since I don't have Task Scheduler for the first PC, I will use AT then.
Did you "minimal or adjust settings" (I believe this is the correct wording) and choose the Offline Browsing Package? If you use any of the predefined setups, Taskscheduler will not be installed.
You're right, I chose the 'minimal' setting. I thought I should be able to choose Task Scheduler, but it only comes with the 'typical' installation. Anyway, I re-installed IE 5.5 with 'typical' and Task Scheduler was installed.

One thing that I've just tried is 'multiple schedule'. For one of the schedules, I chose 'At start up', but somehow the job was not performed when I restarted the PC.

Anyway, thanks a lot for your help!
Sorry yongsing, should've said the scheduler appears in my computer or explorer along with your drives,etc.

Ah well...