It might help if you post a sanitized copy of the script, rather than trying to describe it like in the current fashion.
The easiest guess, with a sharing violation, is that the file is locked for reading or writing by a process other than the one which the scheduled job is running under. That, or that scheduled job credentials are inadequate. *ASB *(Professional Bio <http://about.me/Andrew.S.Baker/bio>) *Technology Services that Maximize Business Results... * On Thu, Mar 31, 2011 at 10:27 AM, itli...@imcu.com <itli...@imcu.com> wrote: > > > Creating every 60 seconds or so. It is an environment variable batch > creation. Creates time, date, etc… > > We had to stop a bunch of WSUS GPO’s because of network lag. We have them > all back on and we have rebooted all servers since but I am really thinking > the coincidence lies with the disabling and enabling of the gpo’s. > > > > > > *From:* Jonathan Link [mailto:jonathan.l...@gmail.com] > *Posted At:* Thursday, March 31, 2011 10:23 AM > > *Posted To:* itli...@imcu.com > *Conversation:* Find out what is doing this > *Subject:* Re: Find out what is doing this > > > > You're creating a batch file every 60 seconds, for some reason. At some > point, one would expect it to run... I guess I am unclear on the process > taking place. Is it creating the file and then running the file every 60 > seconds? Or is it just creating the file every 60 seconds, and only running > it once per day at 11pm? > > > > Could? I am not sure. Have you changed anything recently. > > On Thu, Mar 31, 2011 at 10:15 AM, itli...@imcu.com <itli...@imcu.com> > wrote: > > We are putting process monitor on all servers to see who might be using it > but we haven’t found any so far. > > Could a local security policy or gpo cause this kind of issue? > > > > *From:* Jonathan Link [mailto:jonathan.l...@gmail.com] > *Posted At:* Thursday, March 31, 2011 10:09 AM > > > *Posted To:* itli...@imcu.com > *Conversation:* Find out what is doing this > *Subject:* Re: Find out what is doing this > > > > Is there another task that runs setenv.bat at 11pm? If so, that'll cause > your sharing violation, because they both fire at the same time, and the > file can't be saved. > > > > > On Thu, Mar 31, 2011 at 10:05 AM, Charlie Kaiser < > charl...@golden-eagle.org> wrote: > > Crank up auditing on the file and see who's accessing it. Also, with > process > monitor, see what other processes are involved... > > > *********************** > Charlie Kaiser > charl...@golden-eagle.org > Kingman, AZ > *********************** > > > > -----Original Message----- > > From: itli...@imcu.com [mailto:itli...@imcu.com] > > > Sent: Thursday, March 31, 2011 7:02 AM > > To: NT System Admin Issues > > Subject: RE: Find out what is doing this > > > > No backups at the time of error. > > > > -----Original Message----- > > From: Charlie Kaiser [mailto:charl...@golden-eagle.org] > > Posted At: Thursday, March 31, 2011 9:58 AM > > Posted To: itli...@imcu.com > > Conversation: Find out what is doing this > > Subject: RE: Find out what is doing this > > > > Is there a backup going on at that time? > > > > *********************** > > Charlie Kaiser > > charl...@golden-eagle.org > > Kingman, AZ > > *********************** > > > > > > > -----Original Message----- > > > From: itli...@imcu.com [mailto:itli...@imcu.com] > > > Sent: Thursday, March 31, 2011 6:55 AM > > > To: NT System Admin Issues > > > Subject: RE: Find out what is doing this > > > > > > Here is the process > > > .bat creates setenv.bat in dir x > > > About every 60 seconds all day long. > > > At around 11:00pm each night this process fails with a sharing > > violation > > > of setenv.bat. > > > Rerun the automated task and it runs. The problem is this file is > > being > > > Created all day long no issues just around 11:00pm. With process > > > monitor we see the sharing violation but can't tell what was trying to > > > share it or what was sharing it at the time?? > > > Need more guidance with process monitor I guess? > > > Can I turn on auditing for dir x ? > > > Will Windows give me more of a feel for what failed? > > > > > > > > > -----Original Message----- > > > From: Ben Scott [mailto:mailvor...@gmail.com] > > > Posted At: Thursday, March 31, 2011 9:34 AM > > > Posted To: itli...@imcu.com > > > Conversation: Find out what is doing this > > > Subject: Re: Find out what is doing this > > > > > > On Thu, Mar 31, 2011 at 9:21 AM, itli...@imcu.com <itli...@imcu.com> > > > wrote: > > > > Have a third party that creates a file before it runs. > > > > > > You need to explain that using a lot more words. :) > > > > > > > We're also using a piece of software called Process Monitor and we > > > were able > > > > to pin it down last night to a 'Sharing Violation' . > > > > > > "Sharing Violation" nominally means a file was already open or > > > locked when the program tried to access it. > > > > > > Of course, that's also one of the error codes that Microsoft > > > sometimes uses for completely unrelated things, so there's a > > > (relatively small) chance it's something else. > > > > > > -- Ben > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin