Executing a python script while it is running
hobesh at gmail.com
Tue Jun 16 18:48:56 EDT 2009
> A lot more information would be useful. What version of Python, and what
> operating system environment? Exactly what would you like to happen when
> the batch file is invoked a second time?
I'm running Python 2.6.2 on Windows. I'm passing filenames to the
batch files and I need all filenames to be processed. I can't have
any fails. I'm working on logging any fails I do have so that I can
maybe batch process at the end of the day.
> 2) let them both run as separate processes
This sounds like a good option, but I'm not totally sure on how to go
> 4) queue something to be processed when the first run finishes
I had the same idea, but I believe it would involve having another
python script run all day long, which wouldn't necessarily be a bad
thing, but I'd like to explore other options as well.
> What provisions does this existing application have for long-running batch
> files? Seems the synchronization ought to happen there. Do you have any
> constraints on how long your script might take, worst case? What if the
> application finishes its tasks at a faster average rate than your script can
> process them?
The batch file is moving large video files. Duration probably ranges
from 10 sec to 45 mins. On average, the application takes longer to
process the files than it does the batch file/python script takes to
copy them, but I'm concerned about the occasional time that the
application finishes a small file right after finishing a large file.
Thanks for your response!
More information about the Python-list