Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > maximum command length in Windows Scheduler

Reply
Thread Tools Display Modes

maximum command length in Windows Scheduler

 
 
rpremuz@yahoo.com
Guest
Posts: n/a

 
      08-02-2007
Hello,

I have a question for a MS MVP.

What is the maximum length of a command that you can put in a Windows
scheduled task (its run field)?

E.g. http://support.microsoft.com/kb/830473/en-us
gives command-line string limitations for various versions of MS
Windows but does not tell anything about the Windows Scheduler.

-- rpr. /Robert Premuz/

 
Reply With Quote
 
 
 
 
Gary S. Terhune
Guest
Posts: n/a

 
      08-02-2007
Can't say with absolute certainty, but as that article has the same figures
for all the examples -- "...either 2047 or 8191 characters (as appropriate
to your operating system)" -- I would assume those figures also apply to a
command for Scheduled Tasks. Only other figure I could imagine would be 255
or 256 characters, but I just created a scheduled task with a command 270
characters long and it ran just fine.

--
Gary S. Terhune
MS-MVP Shell/User
www.grystmill.com

<> wrote in message
news: oups.com...
> Hello,
>
> I have a question for a MS MVP.
>
> What is the maximum length of a command that you can put in a Windows
> scheduled task (its run field)?
>
> E.g. http://support.microsoft.com/kb/830473/en-us
> gives command-line string limitations for various versions of MS
> Windows but does not tell anything about the Windows Scheduler.
>
> -- rpr. /Robert Premuz/
>



 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      08-02-2007

<> wrote in message
news: oups.com...
> Hello,
>
> I have a question for a MS MVP.
>
> What is the maximum length of a command that you can put in a Windows
> scheduled task (its run field)?
>
> E.g. http://support.microsoft.com/kb/830473/en-us
> gives command-line string limitations for various versions of MS
> Windows but does not tell anything about the Windows Scheduler.
>
> -- rpr. /Robert Premuz/
>


What would be the point of having a command line that exceeds
a few hundred characters? It would be totally unmanageable! If
you really want to find out then you can do so quite easily, by
scheduling this command to run:

cmd /c echo 1234567890x

Now double the numerical string time and again and check
how long it takes until the trailing "x" disappears. The test may
be tedious (and IMHO futile) but it will give you an authoritative
answer.


 
Reply With Quote
 
Chuck
Guest
Posts: n/a

 
      08-03-2007
Somewhere in the past, along with the long file and folder names, the buffer
for command lines got larger.
Long folder names several layers deep plus a long file name or two can
easily fill a very large command line buffer.

"What would be the point of having a command line that exceeds
a few hundred characters? It would be totally unmanageable! If
you really want to find out then you can do so quite easily, by
scheduling this command to run:"

"Pegasus (MVP)" <> wrote in message
news:...
>
> <> wrote in message
> news: oups.com...
> > Hello,
> >
> > I have a question for a MS MVP.
> >
> > What is the maximum length of a command that you can put in a Windows
> > scheduled task (its run field)?
> >
> > E.g. http://support.microsoft.com/kb/830473/en-us
> > gives command-line string limitations for various versions of MS
> > Windows but does not tell anything about the Windows Scheduler.
> >
> > -- rpr. /Robert Premuz/
> >

>
> What would be the point of having a command line that exceeds
> a few hundred characters? It would be totally unmanageable! If
> you really want to find out then you can do so quite easily, by
> scheduling this command to run:
>
> cmd /c echo 1234567890x
>
> Now double the numerical string time and again and check
> how long it takes until the trailing "x" disappears. The test may
> be tedious (and IMHO futile) but it will give you an authoritative
> answer.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Launch command window from task scheduler Markus Windows Vista General Discussion 1 05-10-2008 05:07 PM
Task Scheduler - command <schtasks /query /fo csv /nh> does not wo Herman VL Windows Vista General Discussion 2 11-13-2007 02:12 PM
command line maximum number of characters Vincent Windows Vista General Discussion 1 07-09-2007 04:10 PM
Task Scheduler Command Line XML senrabdet Windows Vista General Discussion 2 09-05-2006 02:19 PM
Task Scheduler Command Line & Files senrabdet Windows Vista Performance 0 08-14-2006 02:15 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59