Kicking off a python script using Windows Scheduled Task

K

korean_dave

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:\testdirectory\script_RunTests

python AutomatedTestRun.py

but when AutomatedTestRun.py calls other python modules, we don't see
output.
 
K

korean_dave

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

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

Lawrence D'Oliveiro

In message
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/>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top