From: Peter Bailey Date: 2008-09-12T20:50:41+09:00 Subject: Re: Scripts dying mid-way Robert Klemme wrote: > 2008/9/12 Peter Bailey : > >> Well, if you look at the above, all of the image processing happens >> before any file movement. So, all the files are created, then, they're >> told to move. > > Accessing a resource concurrently in a not read only manner has always > potential for surprising behavior. So it's best to take measures to > prevent it. > >> What do you mean by concurrent executions of the same script? My >> scheduler doesn't allow the script to run if it's already running. > > Did you verify that it actually behaves as expected? Even if it does > behave as expected it might be a good idea to make your script more > robust by adding a mechanism that prevents concurrent execution of the > script. You might change your scheduler at one day and the other one > does not prevent this etc. > > Well, my glass bowl is in repair at the moment so I am afraid you will > have to debug this yourself. Without diagnostic output nobody here > can explain what's happening. > > Cheers > > robert Aaaaaaah. My scheduler is set to run every 5 minutes. The first thing the script does is copy the files to a sub-directory, so, even if the thing executed again within those 5 minutes, there are no files in the source directory to act on, so, it doesn't execute. What's so frustrating is that this thing executes just fine in my editor. It works perfectly. What's the difference between running it in an editor and having it run as a scheduled event? -- Posted via http://www.ruby-forum.com/.