Page 1 of 1 1
Topic Options
#3922 - 2000-08-30 12:01 AM winAT
Anonymous
Unregistered


I'm logged on as an admin and want to start a batch-file at a user with winAT from the ntreskit.

But I can't get winAT working, does anybody has a clue?

Rene

Top
#3923 - 2000-08-30 12:03 AM Re: winAT
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Is your scheduling service running?

------------------
Greetings,
Patrick Rutten
<-PR->

_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#3924 - 2000-08-30 12:06 AM Re: winAT
Anonymous
Unregistered


yes it's running on both sides

[This message has been edited by ruwaard (edited 29 August 2000).]

Top
#3925 - 2000-08-30 12:07 AM Re: winAT
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Have you tried the AT command yet?

------------------
Greetings,
Patrick Rutten
<-PR->

We will either
find a way or
make one
(Hannibal).

_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#3926 - 2000-08-30 12:40 AM Re: winAT
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Mighty,
be careful with the at command :
i didn't knew it but it was discussed in another topic - The at scheduler was obviously replaced within sp5 through the 'MSTask-Scheduler' ... so what i found out is : the at is there and is running , but the synthax i was used to returns only :
File not found ! at execution time ...
Didn't need to know the correct Synthax yet ,
proofed on NT sp 6a ...

regards Jochen

_________________________



Top
#3927 - 2000-08-29 01:03 PM Re: winAT
Anonymous
Unregistered


What do you put in the cmndline?

e.g. I want to start a batch-file, so I select the users PC and in the cmndline I put:

start v:\...\...\*.bat


Top
#3928 - 2000-08-29 01:15 PM Re: winAT
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Rene,

quote:

The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted, the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.


Note that command should be a fully qualified path on the machine that executes the programm...
eg: "c:\apps\startapp.bat"

regards Jochen

p.s: Be aware of SP 5

[This message has been edited by jpols (edited 29 August 2000).]

_________________________



Top
#3929 - 2000-08-29 01:46 PM Re: winAT
Anonymous
Unregistered


Thanks for the input.

I tried:

->at mbd09853 13:30 /interactive /every:29/08/2000 "c:\...\...\*.exe"

- and I tried the gui

But it doesn't work

Top
#3930 - 2000-08-29 03:50 PM Re: winAT
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hmm ,
did you fergot the leading backslashes on the Machine Name ?
is this a wildcard in front of the .exe ???
this is unsupported ; You have to place every single program in a single at command

luck
J.

_________________________



Top
#3931 - 2000-08-29 03:50 PM Re: winAT
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hmm ,
did you fergot the leading backslashes on the Machine Name ?
is this a wildcard in front of the .exe ???
this is unsupported ; You have to place every single program in a single at command

luck
J.


must be a nervous thumb (ThinkPad)

[This message has been edited by jpols (edited 29 August 2000).]

_________________________



Top
#3932 - 2000-08-29 04:16 PM Re: winAT
Anonymous
Unregistered


I tried this and it didn't work

at \\mbd09853 13:30 /interactive /every:29/08/2000 "v:\...\...\start.exe"

Top
#3933 - 2000-08-29 06:41 PM Re: winAT
Anonymous
Unregistered


I think that your '/every:29/08/2000' should read '/next:29'.

The scheduler logs onto the target machine as SYSTEM by default. It doesn't care that YOU are administrator, it gets the local SYSTEM rights, and more importantly, drive attachments. So the V: drive may not be visible.

Try starting using a local file that is always available, and no privilages set - say, c:\temp\.

You could also add '>c:\temp\at.log' to the command line to try and capture any response to that file.

Start.exe does nothing anyway. You could try 'start cmd' which would open a command box.

THT

Top
#3934 - 2000-08-30 11:21 AM Re: winAT
Anonymous
Unregistered


Thanks for all the input,

I can remotely start a program with winat on a PC.
The problem is that I can only remotely start a program which is on the remote-PC's local drive.
I want to remotely start a batch file from the server on a workstation.

Rene

Top
#3935 - 2000-08-30 04:09 PM Re: winAT
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Rene,
didn't saw the forrest with all that trees [every:]...

If You have to start a batch that lies on the Server :
-> Create a batch to copy to the Client like:
@echo off
CALL \\Servername\sharename\[path]\batch.cmd
EXIT

-> schedule this one on the clients and you'll have the results....

Ehhhmm , stop , this is the principle of a Logon Script ! Did you ever thought of doin'
doin this @ logon ?

Jochen

[This message has been edited by jpols (edited 30 August 2000).]

_________________________



Top
#3936 - 2000-09-05 05:45 PM Re: winAT
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Slight problem with using the at command on systems that have "Task Scheduler" installed, and not the "Scheduler" service.(this is installed with a new version of IE4 and greater)

The problem is that if you use the /interactive switch you will have no access to network resources.

With the older "Scheduler" service you could fix this by running the "Scheduler" service with a username/password that had rights. This was an extremely helpfull service, especially with scripts!

BUT! (because of complaints that the AT command line was to hard to work, hence the new all GUI Task Scheduler)

You can not run the new "Task Scheduler" service with a username/password, it can only run under the system account (and the system account can't access network resources while in interactive mode).

I have been looking for a command line util to create *.job files that the new service runs off of (you can give username/password for each .job file) but I have been so far unsuccessful. You can find the .job files in the %systemroot%\tasks directory.

You can place a .job file in the tasks directory by using AT but, job files created by AT will only run under the system account, if you edit an at*.job file with the GUI interface that job will no longer be visible by the AT command.

Bryce

Top
#3937 - 2000-09-05 08:13 PM Re: winAT
Anonymous
Unregistered


I ran into the problem where I installed IE 4.0 and it changed my scheduler to the Task Scheduler and I could no longer run some of my tasks with my security. So what I did is find a server that had the correct scheduler on it and made the registry entries in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Schedule the same on the server that just had it's scheduler changed as a result of the IE 4.0 installation. I rebooted and I had my old scheduler back where I could run it with my security. The main thing is the old scheduler uses atsvc.exe and the Task Scheduler uses mstask.exe.
Top
#3938 - 2000-09-05 09:23 PM Re: winAT
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Yea I found a MS KB article (Q196731) that tells you how to get your old version of scheduler back.

"Scheduled Tasks" looks like it could be a good tool, but there are no good command line utils for it.


Bryce

Top
#3939 - 2000-09-08 02:13 AM Re: winAT
Anonymous
Unregistered


Bryce & All,

One of the guys here wrote a little app to do just that. Create jobs from the command line.

I have forwarded the app to you. I dont know of any distribution restrictions on it.

This is what it can do:

tsch.exe command [option [...]]

Commands:

? - display this help
LIST - list all jobs
DELETE jobname - delete a job
RUN jobname - delete a job
ADD jobname addoption [...] - add a new job

ADD options:
/application: applicationname - applicaiton file name (use " " if necessary)
/parameters: parameters - command line parameters (use " " if necessary)
/workingdirectory: workingdirectory - where to start the application (use " " if necessary)
/maxruntime: maximum task run time (milliseconds)
/flags: taskflags - flags for the task

TASK_FLAG_INTERACTIVE (0x1)
TASK_FLAG_DELETE_WHEN_DONE (0x2)
TASK_FLAG_DISABLED (0x4)
TASK_FLAG_START_ONLY_IF_IDLE (0x10)
TASK_FLAG_KILL_ON_IDLE_END (0x20)
TASK_FLAG_DONT_START_IF_ON_BATTERIES (0x40)
TASK_FLAG_KILL_IF_GOING_ON_BATTERIES (0x80)
TASK_FLAG_RUN_ONLY_IF_DOCKED (0x100)
TASK_FLAG_HIDDEN (0x200)
TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET (0x400)
TASK_FLAG_RESTART_ON_IDLE_RESUME (0x800)
TASK_FLAG_SYSTEM_REQUIRED (0x1000)

/type: type - job type

TASK_TIME_TRIGGER_ONCE = 0
TASK_TIME_TRIGGER_DAILY = 1
TASK_TIME_TRIGGER_WEEKLY = 2
TASK_TIME_TRIGGER_MONTHLYDATE = 3
TASK_TIME_TRIGGER_MONTHLYDOW = 4
TASK_EVENT_TRIGGER_ON_IDLE = 5
TASK_EVENT_TRIGGER_AT_SYSTEMSTART = 6
TASK_EVENT_TRIGGER_AT_LOGON = 7

/start: date - date job trigger becomes active
/end: date - date when job trigger becomes inactive
/time: time - time the job trigger fires hh:mm:ss (24-hr)
/schedule: options
daily: daysinterval
weekly: weeksinterval/daysoftheweek
monthlydate: daysofthemonth/months
monthlydow: weeksofthemonth/daysoftheweek/months
DaysOfTheWeek:
TASK_SUNDAY (0x1)
TASK_MONDAY (0x2)
TASK_TUESDAY (0x4)
TASK_WEDNESDAY (0x8)
TASK_THURSDAY (0x10)
TASK_FRIDAY (0x20)
TASK_SATURDAY (0x40)
WeeksOfTheMonth:
TASK_FIRST_WEEK (1)
TASK_SECOND_WEEK (2)
TASK_THIRD_WEEK (3)
TASK_FOURTH_WEEK (4)
TASK_LAST_WEEK (5)
Months:
TASK_JANUARY (0x1)
TASK_FEBRUARY (0x2)
TASK_MARCH (0x4)
TASK_APRIL (0x8)
TASK_MAY (0x10)
TASK_JUNE (0x20)
TASK_JULY (0x40)
TASK_AUGUST (0x80)
TASK_SEPTEMBER (0x100)
TASK_OCTOBER (0x200)
TASK_NOVEMBER (0x400)
TASK_DECEMBER (0x800)

/user: user
/password: password


If anyone else needs it, hopefully Bryce (Nudge Nudge) will post it on his web site.

Let me know how it goes.

------------------
David Gray
IT Professional
Brisbane Australia

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.065 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org