1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

Create A Macro to Take Scheduled Actions

Discussion in 'Windows Home Server' started by Alan Auerbach, Sep 2, 2009.

  1. Can I create a macro to automatically stop and start a service at particular
    times each day?

    /s/ Alan Auerbach
     
  2. "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > Can I create a macro to automatically stop and start a service at
    > particular times each day?
    >
    > /s/ Alan Auerbach<!--colorc--><!--/colorc-->

    Using a macro to start/stop a service would be a poor method to do this. You
    should create a scheduled task that uses the "net start" or "net stop"
    command.
     
  3. Dear Pegasus,

    Thank you for the information.

    Can you assist me with the command line? I am tryiing to start and stop
    MSSQL$Act7 at specified times. The only way I know how to do this is by
    running services.msc (or through the Control Panel) which then requires
    manually selecting the service and selecting the stop or start instruction.

    I appreciate the assistance--as always.

    /s/ Alan Auerbach
    "Pegasus [MVP]" <news@microsoft.com> wrote in message
    news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    >
    > "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    > news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> Can I create a macro to automatically stop and start a service at
    >> particular times each day?
    >>
    >> /s/ Alan Auerbach<!--colorc--><!--/colorc-->
    >
    > Using a macro to start/stop a service would be a poor method to do this.
    > You should create a scheduled task that uses the "net start" or "net stop"
    > command.
    > <!--colorc--><!--/colorc-->
     
  4. The advantage of console commands is that just about all of them have
    inbuilt help facilities. Net.exe is no exception - in fact it probably has
    more help than most other commands. As a server administrator you would now
    open a Command Prompt, then type each of the following commands:
    net /?
    net help
    net start /?
    net stop /?
    net help start
    net help stop
    You will probably see that it is a trivial job to start or stop a service
    from the Command Prompt. Remember - many GUIs were designed for end users.
    Administrators use numerous console commands that are very powerful and that
    can be built into batch files.


    "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > Dear Pegasus,
    >
    > Thank you for the information.
    >
    > Can you assist me with the command line? I am tryiing to start and stop
    > MSSQL$Act7 at specified times. The only way I know how to do this is by
    > running services.msc (or through the Control Panel) which then requires
    > manually selecting the service and selecting the stop or start
    > instruction.
    >
    > I appreciate the assistance--as always.
    >
    > /s/ Alan Auerbach
    > "Pegasus [MVP]" <news@microsoft.com> wrote in message
    > news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >>
    >> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>> Can I create a macro to automatically stop and start a service at
    >>> particular times each day?
    >>>
    >>> /s/ Alan Auerbach<!--colorc--><!--/colorc-->
    >>
    >> Using a macro to start/stop a service would be a poor method to do this.
    >> You should create a scheduled task that uses the "net start" or "net
    >> stop" command.
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     
  5. Dear Pegasus,

    Thank you for the directions.

    You may not beleive this, but I stated with Dartmouth Basic 45-years ago,
    learned assmbly language and DOS and actually programmed machines--until
    about 25-years ago. I always preferred command line instructions but have
    become so dependant on GUI that I stopped keeping up with it; probably after
    Win98 came out (I threw out my MS-DOS manual only last year).

    I relish the thought of getting back into it--even for a simple minor task.
    Thank you for giving me the push! :)

    /s/ Alan Auerbach
    "Pegasus [MVP]" <news@microsoft.com> wrote in message
    news:uVJkijALKHA.4168@TK2MSFTNGP05.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > The advantage of console commands is that just about all of them have
    > inbuilt help facilities. Net.exe is no exception - in fact it probably has
    > more help than most other commands. As a server administrator you would
    > now open a Command Prompt, then type each of the following commands:
    > net /?
    > net help
    > net start /?
    > net stop /?
    > net help start
    > net help stop
    > You will probably see that it is a trivial job to start or stop a service
    > from the Command Prompt. Remember - many GUIs were designed for end users.
    > Administrators use numerous console commands that are very powerful and
    > that can be built into batch files.
    >
    >
    > "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    > news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> Dear Pegasus,
    >>
    >> Thank you for the information.
    >>
    >> Can you assist me with the command line? I am tryiing to start and stop
    >> MSSQL$Act7 at specified times. The only way I know how to do this is by
    >> running services.msc (or through the Control Panel) which then requires
    >> manually selecting the service and selecting the stop or start
    >> instruction.
    >>
    >> I appreciate the assistance--as always.
    >>
    >> /s/ Alan Auerbach
    >> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >> news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>>
    >>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...
    >>>> Can I create a macro to automatically stop and start a service at
    >>>> particular times each day?
    >>>>
    >>>> /s/ Alan Auerbach
    >>>
    >>> Using a macro to start/stop a service would be a poor method to do this.
    >>> You should create a scheduled task that uses the "net start" or "net
    >>> stop" command.
    >>><!--colorc--><!--/colorc-->
    >>
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     
  6. Dear Pegasus,

    My woefully out-of-date skills leave me helpless.

    I have written a command line:

    C:\WINDOWS\system32\cmd.exe net stop MSSQL$Act7

    that does not work. From the command prompt, net stop MSSQL$Act7 works
    perfectly but the scheduled task does not operate. I suppose it is a syntax
    error.

    Can you make another suggestion?

    Thank you,
    /s/ Alan

    "Pegasus [MVP]" <news@microsoft.com> wrote in message
    news:uVJkijALKHA.4168@TK2MSFTNGP05.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > The advantage of console commands is that just about all of them have
    > inbuilt help facilities. Net.exe is no exception - in fact it probably has
    > more help than most other commands. As a server administrator you would
    > now open a Command Prompt, then type each of the following commands:
    > net /?
    > net help
    > net start /?
    > net stop /?
    > net help start
    > net help stop
    > You will probably see that it is a trivial job to start or stop a service
    > from the Command Prompt. Remember - many GUIs were designed for end users.
    > Administrators use numerous console commands that are very powerful and
    > that can be built into batch files.
    >
    >
    > "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    > news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> Dear Pegasus,
    >>
    >> Thank you for the information.
    >>
    >> Can you assist me with the command line? I am tryiing to start and stop
    >> MSSQL$Act7 at specified times. The only way I know how to do this is by
    >> running services.msc (or through the Control Panel) which then requires
    >> manually selecting the service and selecting the stop or start
    >> instruction.
    >>
    >> I appreciate the assistance--as always.
    >>
    >> /s/ Alan Auerbach
    >> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >> news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>>
    >>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...
    >>>> Can I create a macro to automatically stop and start a service at
    >>>> particular times each day?
    >>>>
    >>>> /s/ Alan Auerbach
    >>>
    >>> Using a macro to start/stop a service would be a poor method to do this.
    >>> You should create a scheduled task that uses the "net start" or "net
    >>> stop" command.
    >>><!--colorc--><!--/colorc-->
    >>
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     
  7. I just realized that I left out the /C switch, but I am still at a loss.

    "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    news:OFJc$mCLKHA.1248@TK2MSFTNGP04.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > Dear Pegasus,
    >
    > My woefully out-of-date skills leave me helpless.
    >
    > I have written a command line:
    >
    > C:WINDOWSsystem32cmd.exe net stop MSSQL$Act7
    >
    > that does not work. From the command prompt, net stop MSSQL$Act7 works
    > perfectly but the scheduled task does not operate. I suppose it is a
    > syntax error.
    >
    > Can you make another suggestion?
    >
    > Thank you,
    > /s/ Alan
    >
    > "Pegasus [MVP]" <news@microsoft.com> wrote in message
    > news:uVJkijALKHA.4168@TK2MSFTNGP05.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> The advantage of console commands is that just about all of them have
    >> inbuilt help facilities. Net.exe is no exception - in fact it probably
    >> has more help than most other commands. As a server administrator you
    >> would now open a Command Prompt, then type each of the following
    >> commands:
    >> net /?
    >> net help
    >> net start /?
    >> net stop /?
    >> net help start
    >> net help stop
    >> You will probably see that it is a trivial job to start or stop a service
    >> from the Command Prompt. Remember - many GUIs were designed for end
    >> users. Administrators use numerous console commands that are very
    >> powerful and that can be built into batch files.
    >>
    >>
    >> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >> news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>> Dear Pegasus,
    >>>
    >>> Thank you for the information.
    >>>
    >>> Can you assist me with the command line? I am tryiing to start and stop
    >>> MSSQL$Act7 at specified times. The only way I know how to do this is by
    >>> running services.msc (or through the Control Panel) which then requires
    >>> manually selecting the service and selecting the stop or start
    >>> instruction.
    >>>
    >>> I appreciate the assistance--as always.
    >>>
    >>> /s/ Alan Auerbach
    >>> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >>> news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...
    >>>>
    >>>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>>> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...
    >>>>> Can I create a macro to automatically stop and start a service at
    >>>>> particular times each day?
    >>>>>
    >>>>> /s/ Alan Auerbach
    >>>>
    >>>> Using a macro to start/stop a service would be a poor method to do
    >>>> this. You should create a scheduled task that uses the "net start" or
    >>>> "net stop" command.
    >>>>
    >>>
    >>><!--colorc--><!--/colorc-->
    >>
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     
  8. Daer Pegasus,

    Never mind! I got it.

    I deleted the space after the switch and now it works properly.

    Thank you for all your assistance. I apologize for the bother.

    /s/ Alan
    "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    news:OFJc$mCLKHA.1248@TK2MSFTNGP04.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > Dear Pegasus,
    >
    > My woefully out-of-date skills leave me helpless.
    >
    > I have written a command line:
    >
    > C:WINDOWSsystem32cmd.exe net stop MSSQL$Act7
    >
    > that does not work. From the command prompt, net stop MSSQL$Act7 works
    > perfectly but the scheduled task does not operate. I suppose it is a
    > syntax error.
    >
    > Can you make another suggestion?
    >
    > Thank you,
    > /s/ Alan
    >
    > "Pegasus [MVP]" <news@microsoft.com> wrote in message
    > news:uVJkijALKHA.4168@TK2MSFTNGP05.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> The advantage of console commands is that just about all of them have
    >> inbuilt help facilities. Net.exe is no exception - in fact it probably
    >> has more help than most other commands. As a server administrator you
    >> would now open a Command Prompt, then type each of the following
    >> commands:
    >> net /?
    >> net help
    >> net start /?
    >> net stop /?
    >> net help start
    >> net help stop
    >> You will probably see that it is a trivial job to start or stop a service
    >> from the Command Prompt. Remember - many GUIs were designed for end
    >> users. Administrators use numerous console commands that are very
    >> powerful and that can be built into batch files.
    >>
    >>
    >> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >> news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>> Dear Pegasus,
    >>>
    >>> Thank you for the information.
    >>>
    >>> Can you assist me with the command line? I am tryiing to start and stop
    >>> MSSQL$Act7 at specified times. The only way I know how to do this is by
    >>> running services.msc (or through the Control Panel) which then requires
    >>> manually selecting the service and selecting the stop or start
    >>> instruction.
    >>>
    >>> I appreciate the assistance--as always.
    >>>
    >>> /s/ Alan Auerbach
    >>> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >>> news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...
    >>>>
    >>>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>>> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...
    >>>>> Can I create a macro to automatically stop and start a service at
    >>>>> particular times each day?
    >>>>>
    >>>>> /s/ Alan Auerbach
    >>>>
    >>>> Using a macro to start/stop a service would be a poor method to do
    >>>> this. You should create a scheduled task that uses the "net start" or
    >>>> "net stop" command.
    >>>>
    >>>
    >>><!--colorc--><!--/colorc-->
    >>
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     
  9. Thanks for the feedback. It appears that you're making life difficult for
    yourself. There is absolutely no need to invoke a secondary command
    processor and use some switch. The commands

    net stop NameOfService
    net start NameOfService

    will work perfectly well! (Which is exactly what the "net help stop"
    facility suggests).


    "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    news:%23lW35xCLKHA.4432@TK2MSFTNGP03.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > Daer Pegasus,
    >
    > Never mind! I got it.
    >
    > I deleted the space after the switch and now it works properly.
    >
    > Thank you for all your assistance. I apologize for the bother.
    >
    > /s/ Alan
    > "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    > news:OFJc$mCLKHA.1248@TK2MSFTNGP04.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> Dear Pegasus,
    >>
    >> My woefully out-of-date skills leave me helpless.
    >>
    >> I have written a command line:
    >>
    >> C:WINDOWSsystem32cmd.exe net stop MSSQL$Act7
    >>
    >> that does not work. From the command prompt, net stop MSSQL$Act7 works
    >> perfectly but the scheduled task does not operate. I suppose it is a
    >> syntax error.
    >>
    >> Can you make another suggestion?
    >>
    >> Thank you,
    >> /s/ Alan
    >>
    >> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >> news:uVJkijALKHA.4168@TK2MSFTNGP05.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>> The advantage of console commands is that just about all of them have
    >>> inbuilt help facilities. Net.exe is no exception - in fact it probably
    >>> has more help than most other commands. As a server administrator you
    >>> would now open a Command Prompt, then type each of the following
    >>> commands:
    >>> net /?
    >>> net help
    >>> net start /?
    >>> net stop /?
    >>> net help start
    >>> net help stop
    >>> You will probably see that it is a trivial job to start or stop a
    >>> service from the Command Prompt. Remember - many GUIs were designed for
    >>> end users. Administrators use numerous console commands that are very
    >>> powerful and that can be built into batch files.
    >>>
    >>>
    >>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>> news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...
    >>>> Dear Pegasus,
    >>>>
    >>>> Thank you for the information.
    >>>>
    >>>> Can you assist me with the command line? I am tryiing to start and stop
    >>>> MSSQL$Act7 at specified times. The only way I know how to do this is by
    >>>> running services.msc (or through the Control Panel) which then requires
    >>>> manually selecting the service and selecting the stop or start
    >>>> instruction.
    >>>>
    >>>> I appreciate the assistance--as always.
    >>>>
    >>>> /s/ Alan Auerbach
    >>>> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >>>> news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...
    >>>>>
    >>>>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>>>> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...
    >>>>>> Can I create a macro to automatically stop and start a service at
    >>>>>> particular times each day?
    >>>>>>
    >>>>>> /s/ Alan Auerbach
    >>>>>
    >>>>> Using a macro to start/stop a service would be a poor method to do
    >>>>> this. You should create a scheduled task that uses the "net start" or
    >>>>> "net stop" command.
    >>>>>
    >>>>
    >>>>
    >>>
    >>><!--colorc--><!--/colorc-->
    >>
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     
  10. Dear Pegasus,

    Thank you for the advice.

    I did not realize that I could invoke commands without first running the
    command processor! This is very nice--and efficient. Thank you!

    /s/ Alan
    "Pegasus [MVP]" <news@microsoft.com> wrote in message
    news:%23aBF1XFLKHA.3632@TK2MSFTNGP05.phx.gbl...<!--coloro:blue--><span style="color:blue <!--/coloro-->
    > Thanks for the feedback. It appears that you're making life difficult for
    > yourself. There is absolutely no need to invoke a secondary command
    > processor and use some switch. The commands
    >
    > net stop NameOfService
    > net start NameOfService
    >
    > will work perfectly well! (Which is exactly what the "net help stop"
    > facility suggests).
    >
    >
    > "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    > news:%23lW35xCLKHA.4432@TK2MSFTNGP03.phx.gbl...<!--coloro:green--><span style="color:green <!--/coloro-->
    >> Daer Pegasus,
    >>
    >> Never mind! I got it.
    >>
    >> I deleted the space after the switch and now it works properly.
    >>
    >> Thank you for all your assistance. I apologize for the bother.
    >>
    >> /s/ Alan
    >> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >> news:OFJc$mCLKHA.1248@TK2MSFTNGP04.phx.gbl...<!--coloro:darkred--><span style="color:darkred <!--/coloro-->
    >>> Dear Pegasus,
    >>>
    >>> My woefully out-of-date skills leave me helpless.
    >>>
    >>> I have written a command line:
    >>>
    >>> C:WINDOWSsystem32cmd.exe net stop MSSQL$Act7
    >>>
    >>> that does not work. From the command prompt, net stop MSSQL$Act7 works
    >>> perfectly but the scheduled task does not operate. I suppose it is a
    >>> syntax error.
    >>>
    >>> Can you make another suggestion?
    >>>
    >>> Thank you,
    >>> /s/ Alan
    >>>
    >>> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >>> news:uVJkijALKHA.4168@TK2MSFTNGP05.phx.gbl...
    >>>> The advantage of console commands is that just about all of them have
    >>>> inbuilt help facilities. Net.exe is no exception - in fact it probably
    >>>> has more help than most other commands. As a server administrator you
    >>>> would now open a Command Prompt, then type each of the following
    >>>> commands:
    >>>> net /?
    >>>> net help
    >>>> net start /?
    >>>> net stop /?
    >>>> net help start
    >>>> net help stop
    >>>> You will probably see that it is a trivial job to start or stop a
    >>>> service from the Command Prompt. Remember - many GUIs were designed for
    >>>> end users. Administrators use numerous console commands that are very
    >>>> powerful and that can be built into batch files.
    >>>>
    >>>>
    >>>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>>> news:uPwoAe%23KKHA.4820@TK2MSFTNGP02.phx.gbl...
    >>>>> Dear Pegasus,
    >>>>>
    >>>>> Thank you for the information.
    >>>>>
    >>>>> Can you assist me with the command line? I am tryiing to start and
    >>>>> stop MSSQL$Act7 at specified times. The only way I know how to do this
    >>>>> is by running services.msc (or through the Control Panel) which then
    >>>>> requires manually selecting the service and selecting the stop or
    >>>>> start instruction.
    >>>>>
    >>>>> I appreciate the assistance--as always.
    >>>>>
    >>>>> /s/ Alan Auerbach
    >>>>> "Pegasus [MVP]" <news@microsoft.com> wrote in message
    >>>>> news:O0xxCK5KKHA.3632@TK2MSFTNGP05.phx.gbl...
    >>>>>>
    >>>>>> "Alan Auerbach" <aauerbach@poolthing.com> wrote in message
    >>>>>> news:ecQwmE5KKHA.5956@TK2MSFTNGP03.phx.gbl...
    >>>>>>> Can I create a macro to automatically stop and start a service at
    >>>>>>> particular times each day?
    >>>>>>>
    >>>>>>> /s/ Alan Auerbach
    >>>>>>
    >>>>>> Using a macro to start/stop a service would be a poor method to do
    >>>>>> this. You should create a scheduled task that uses the "net start" or
    >>>>>> "net stop" command.
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>><!--colorc--><!--/colorc-->
    >>
    >><!--colorc--><!--/colorc-->
    >
    > <!--colorc--><!--/colorc-->
     

Share This Page