Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Kicking off a python script using Windows Scheduled Task

Reply
Thread Tools

Kicking off a python script using Windows Scheduled Task

 
 
korean_dave
Guest
Posts: n/a
 
      10-15-2008
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.
 
Reply With Quote
 
 
 
 
korean_dave
Guest
Posts: n/a
 
      10-15-2008
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.com> 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...
>
> 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.


 
Reply With Quote
 
 
 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      10-19-2008
In message
<ccba7d53-20b7-4d26-bc3f->,
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/>.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPs kicking routers off internet? Rob Computer Support 73 07-23-2006 03:59 PM
router kicking modem off line? donna Computer Support 6 01-21-2006 11:51 PM
2nd wireless signal kicking user off network =?Utf-8?B?emFnbmV3?= Wireless Networking 3 09-18-2005 10:43 PM
Scheduled Task script wont run grounghog Microsoft Certification 0 08-12-2004 03:47 PM
OnLoad kicking off process Matt Java 2 02-25-2004 04:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57