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

Chris Stromberger bit_bucket5 at hotmail.com
Thu Jun 6 18:59:11 EDT 2002


Thanks for all the suggestions.  Please see the original thread (same
subject, minus the MARK HAMMOND part) for the answer that worked for
me...or read the pertinent snippet below:

    Change "c:\python21\python.exe c:\scripts\script.py" to
"c:\python21\python.exe" "c:\scripts\script.py" otherwise it's trying
to turn
that whole thing into a single file name. 

On Thu, 6 Jun 2002 12:40:05 -0700, "David LeBlanc" <whisper at oz.net>
wrote:

>I did my tests on Win 2000 pro - what OS are you using?
>
>When it comes to using sockets etc. you might be right that some permissions
>are involved. Would be interesting to know what user account 'at' runs
>under.
>
>Since this isn't strictly a Python issue, maybe comp.os.windows (or
>something like that) might better be able to answer the question. You might
>also check the discussion boards on http://www.codeguru.com/index.shtml or
>http://www.codeproject.com/
>
>If you discover the answer I would be interested in knowing too!
>
>Regards,
>
>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
>> Sent: Thursday, June 06, 2002 12:07
>> To: python-list at python.org
>> Subject: Re: Using AT on XP to run python script - MARK HAMMOND PLEASE
>> READ
>>
>>
>> Interesting findings.  I know mine didn't work bcs the script I want
>> AT to execute sends me an email.  The script sends an email, then I
>> want it to run another AT command to set itself up to run again at a
>> later time.  But I can't get it to work.  If I run the script
>> manually, it runs, sends email and executes the proper AT command.
>> But when AT fires off the task the script set up, nothing happens and
>> no more AT commands are set up.
>>
>> "David LeBlanc" <whisper at oz.net> wrote in message
>> news:<mailman.1023320948.13063.python-list at python.org>...
>> > 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
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>
>




More information about the Python-list mailing list