Re: Command-line does work when scheduled



En Sat, 29 Sep 2007 19:17:49 -0300, Jim <jscrerar@xxxxxxxxxxxxxx> escribi�:

On Sep 29, 3:19 pm, "Gabriel Genellina" <gagsl-...@xxxxxxxxxxxx>
wrote:
En Sat, 29 Sep 2007 17:34:34 -0300, Jim <jscre...@xxxxxxxxxxxxxx> escribi?:

> I want to schedule a Python program that reads the command line for
> input. However, when adding an argument to the command line Python
> will not pick it up when using Windows scheduled tasks.

> How do I get it to work?

Do you write the command line when defining the task? Using double quotes
around arguments with spaces?
It works fine for me.

I ran the following on the Scheduled Tasks:
"J:\Jim Crerar\MyPython\Zero_OE_Counter\Zero_OE_Counter.py" n
"J:\Jim Crerar\MyPython\Zero_OE_Counter\Zero_OE_Counter.py n"
"J:\Jim Crerar\MyPython\Zero_OE_Counter\Zero_OE_Counter.py" "n"
None of them work.
However, no problem with running from *.bat file or directly from
shortcut on my Desktop.

Try prepending the Python executable:

C:\Python25\Python.exe "J:\Jim Crerar\MyPython\Zero_OE_Counter\Zero_OE_Counter.py" n

If it works this way, maybe the .py file extension is not correctly registered.

--
Gabriel Genellina

.



Relevant Pages

  • Command-line does work when scheduled
    ... I want to schedule a Python program that reads the command line for ... when adding an argument to the command line Python ... will not pick it up when using Windows scheduled tasks. ...
    (comp.lang.python)
  • Re: Delete command in a script..
    ... > Well it technically is in MSAccess now in a form's VBA...I want to ... > get it it out and schedule the delete. ... you have to specify the command to be executed with the ... create a .bat file containing the del command, ...
    (microsoft.public.access.modulesdaovba)
  • Are you australian, I mean, shuting over available peaks?
    ... It will greet the growing cell and reserve it prior to its schedule. ... Plenty of members indirectly sweep the lexical monument. ... Beth never spills until Ikram totals the involved command ... All average violent trusts wickedly ...
    (sci.crypt)
  • AT command
    ... Schedule service is running. ... Specifies a remote computer. ... Cancels a scheduled command. ... Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • AT command
    ... Please can you or anyone else tell me as to what command ... line I should use to schedule a task. ... >redirect output to a file, ... >Connecting to network drives ...
    (microsoft.public.windows.server.general)