Scheduling task with AT

S

Srinidhi

Hi,

I am trying to schedule a task to run every minute on my
Windows 2000 server using the AT command. From the help
for AT I notice that there is only an option to run a
command at a particular time of the day but there is no
option to repeat the task on the same day.

I can achieve the same using the Start->programs-
accessories->system tools->scheduled tasks (under
advanced options) so I hoping there is a commandline
option. Please let me know how I can schedule a task to
repeat every minute using commandline interface.

Thanks,
Srinidhi.
 
P

Paul R. Sadowski

I would think you'd run it once as a batch then have it sleep for 60 seconds
and run again.

:start
do stuff
do stuff
sleep 60
goto start
 
B

Bob I

After creating the task look in Scheduled Tasks "folder", Open the task,
Select Schedule, Click Advanced, and set it to run every minute,
 
P

Phil Robyn [MVP]

Paul said:
soon is a one-time task. He wants every minute.

=============yourfile.cmd==============
@echo off
::
:: do whatever yourfile.cmd is supposed to do
::
soon 60 %~f0 %*
============end yourfile.cmd===========

This way, yourfile.cmd will reschedule itself to run
again in 60 seconds.

Soon.exe works great with the (older) Schedule Service
(ATSVC.EXE) but not so well with the (newer) Task
Scheduler (MSTASK.EXE).
 
S

Srinidhi

Yes I could do that. But I was keeping that as my last
option. I was hoping that there is probably a AT
commandline option which is not described in help
especially when I could configure the same (task to run
every minute) using the GUI.

May be there is no such option and I should loop it with a
delay. Thanks for the suggesstion.

Srinidhi.
 
S

Srinidhi

Correct. But I want to achevie that at commandline if it
is possible.

Thanks,
Srindihi.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top