locked
Task Scheduler RRS feed

  • Question

  • I have a ORACLE startup script to instantiate a WebLogic-server. This script does not close the cmd window when you run it in, i.e. you have to keep the cmd-window until you close the WebLogic-server.

    My question is: Can the "Task Scheduler" start a command script that does not terminate?

    I don't want to test it if this might create problems and I can't edit the "Task Scheduler" - this WebLogic script would run at startup.

    Any help will be greatly appreciated.

    Monday, July 18, 2016 10:07 PM

Answers

All replies

  • Hi,

    >>This script does not close the cmd window when you run it in, i.e. you have to keep the cmd-window until you close the WebLogic-server.

    I suppose we could use the powershell command to do it better, just like describes below:

    New-ScheduledTask -AsJob #run scripts silently ,in the background

    For more info, please refer to link below:

    https://technet.microsoft.com/en-us/library/jj649810(v=wps.630).aspx

    You don't need to modify your scripts.

    Best regards,


    Andy_Pan

    Tuesday, July 19, 2016 3:36 AM
  • Yes I can run the WebLogic script within powershell, but:

    1. It ran considerably slower
    2. since the WebLogic starting cmd-script does not exit the cmd-instance, now I have a powershell scipt that is running w/o a return because the "cmd /c" does not return

    My main questions is still can I schedule executing a script that does not complete (doesn't return)?

    Tuesday, July 19, 2016 5:09 PM
  • You probably can but then what do you expect to have happen? Task Scheduler will most likely show it as running forever.

     Maybe you wanted a startup script instead?

    https://technet.microsoft.com/en-us/library/cc753404%28v=ws.11%29.aspx?f=255&MSPPError=-2147217396

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Hello_2018 Friday, July 29, 2016 5:46 AM
    • Marked as answer by Hello_2018 Sunday, July 31, 2016 12:46 AM
    Tuesday, July 19, 2016 6:10 PM