|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Running a win32 com Python script from Cygwin cron
I'm trying to run a Python script from a Cygwin cron job. Here's my Python script:
Code:
import win32com.client, time ie = win32com.client.Dispatch( "InternetExplorer.Application" ) time.sleep( 3 ) ie.Visible = 1 And here's the command I run: Code:
/cygdrive/c/Python22/python.exe c:\\Laszlo\\sandbox\\antun\\opener.py 2>&1 > /tmp/smelly I can run the above command with no problems from the Cygwin Bash shell. The Internet Explorer window opens up. However, when I run it from a cron job, the iexplore.exe service does start (I can see it in the Windows Task Manager), but the window never becomes visible. The /tmp/smelly file (which should contain any output) is empty. Any ideas? Thanks, Antun |
|
#2
|
|||
|
|||
|
use like
my.cmd ----------------------------------------------- REM My.cmd file c:\cygwin\bin\bash -login ~/bin/mysript.sh param1 param2 ---------------------------------------------------- It runs from you user directory, I'd but this cmd file in my widows job Runs perfectly Moisey o. |
|
#3
|
|||
|
|||
|
Thank you! That worked. I know it's been a while, but I had shelved this project, and have only just found the time to implement it. It's working perfectly now.
-Antun Quote:
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Running a win32 com Python script from Cygwin cron |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|