Kicking off a python script using Windows Scheduled Task

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • korean_dave

    Kicking off a python script using Windows Scheduled Task

    Does anyone know how to properly kick off a script using Windows
    Scheduled Task? The script calls other python modules within itself.
    HERE'S THE CATCH:
    I am used to running the script directly from the command window and
    the print() is very handy for us to debug and monitor. When running
    the task from Windows Scheduled Task, we'd like to be able to view the
    command window and keep it up after the Task has completed...

    I used the commands

    CMD /K

    cd C:\testdirector y\script_RunTes ts

    python AutomatedTestRu n.py

    but when AutomatedTestRu n.py calls other python modules, we don't see
    output.
  • korean_dave

    #2
    Re: Kicking off a python script using Windows Scheduled Task

    Hey all. i solved this problem by logging on with my network domain
    login (log in using...)

    instead of NT AUTHORITY\SYSTE M which only gave out local privleges to
    the process started off by Task scheduler.

    On Oct 15, 10:36 am, korean_dave <davidrey...@gm ail.comwrote:
    Does anyone know how to properly kick off a script using Windows
    Scheduled Task? The script calls other python modules within itself.
    HERE'S THE CATCH:
    I am used to running the script directly from the command window and
    the print() is very handy for us to debug and monitor. When running
    the task from Windows Scheduled Task, we'd like to be able to view the
    command window and keep it up after the Task has completed...
    >
    I used the commands
    >
    CMD /K
    >
    cd C:\testdirector y\script_RunTes ts
    >
    python AutomatedTestRu n.py
    >
    but when AutomatedTestRu n.py calls other python modules, we don't see
    output.

    Comment

    • Lawrence D'Oliveiro

      #3
      Re: Kicking off a python script using Windows Scheduled Task

      In message
      <ccba7d53-20b7-4d26-bc3f-7c286f0e4f2d@a1 9g2000pra.googl egroups.com>,
      korean_dave wrote:
      Does anyone know how to properly kick off a script using Windows
      Scheduled Task? The script calls other python modules within itself.
      HERE'S THE CATCH:
      I am used to running the script directly from the command window and
      the print() is very handy for us to debug and monitor. When running
      the task from Windows Scheduled Task, we'd like to be able to view the
      command window and keep it up after the Task has completed...
      Why not redirect stdout and stderr to a log file, and tail that?

      Another option might be screen <http://www.gnu.org/software/screen/>.

      Comment

      Working...