Using AT on XP to run python script - MARK HAMMOND PLEASE READ

David LeBlanc whisper at oz.net
Wed Jun 5 19:48:03 EDT 2002


This is most curious, but I believe the commands _are_ getting executed!

I tried the following (assume time is 16:30) "at 16:32 pythonw
j:\python22\tools\idle\idle.py" (without the qoutes of course). At the
appointed time, there was disk activity, but no idle window popped up (idle
was chosen just to get something to pop up!). However, there _was_ a pythonw
process running in the task manager! I think there might be a way to attach
a console or get access to the GUI, but i'm not sure - maybe Mark Hammond
might have a clue (he being the Python Win guru :) ).

I tried the following:
#at_test.py
import sys
import time

tst = open("testfile.txt", 'a+')

tst.write(time.asctime() + "\n")

tst.close()

put into an 'at' job as: at xx:xx python j:\python22\at_test.py

I expected the output from this to be in j:\python22, but to my surprise, it
was in c:\winnt\system32 where cmd.exe resides! testfile.txt contained the
exact time the 'at' job was set to run at too!

I suspect your last example that produced no visible output did in fact work
:)

In any case, it works - now if one could just get visible output!

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Chris Stromberger
> Sent: Tuesday, June 04, 2002 17:35
> To: python-list at python.org
> Subject: Using AT on XP to run python script
>
>
> I'm having trouble getting AT on XP to run a python script for me.
> Have tried:
>
> at xx:xx "c:\python21\python.exe c:\scripts\script.py"
> at xx:xx "start c:\scripts\script.py"
> at xx:xx "c:\scripts\script.py"
>
> and get "the system cannot find the file specified" for the first two.
> The last version does nothing apparently--no error indication or
> anything.
>
> I imagine it is related to user accounts and such.  Anyone have any
> pointers?
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list