469,949 Members | 2,195 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

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

python AutomatedTestRun.py

but when AutomatedTestRun.py calls other python modules, we don't see
output.
Oct 15 '08 #1
2 4154
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.

On Oct 15, 10:36*am, korean_dave <davidrey...@gmail.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:\testdirectory\script_RunTests

python AutomatedTestRun.py

but when AutomatedTestRun.py calls other python modules, we don't see
output.
Oct 15 '08 #2
In message
<cc**********************************@a19g2000pra. googlegroups.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/>.
Oct 19 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bart Simpson | last post: by
19 posts views Thread by Jane Austine | last post: by
10 posts views Thread by Larry Neylon | last post: by
1 post views Thread by TiredOfSpam | last post: by
2 posts views Thread by mpriem | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.