have a script running to notify me if a certain type of temp file starts building up. Most of the time this works perfectly, but on occasion it will fail for a couple hours before spontaneously working again. Here is the script:
Let>SENDMAIL_STATUS=1
Let>subject=ODB Found
Let>me=[email protected]
Let>myname="[email protected]"
Let>recipients=[email protected]
CountFiles>f:\macola70\data\*.od*,odbcount,0
if> %odbcount% > 5,ODBFound,ODBNotFound
label>ODBFound
Let>body=%odbcount% OD* Files Have Been Found In The Macola Root
SMTPSendMail>recipients,mail.work.com,me,myname,subject,body,
label>ODBNotFound
It's been difficult to catch while it's failing. While it's failing, in Windows Explorer I can see the *.od* files sitting there, (there are more than 5), but this is what the log says:
7/31/2006 13:34:00:265 - Started Macro : Notify Of ODB FailOver
7/31/2006 13:34:00:499 - Let>SENDMAIL_STATUS=1
7/31/2006 13:34:00:531 - Let>subject=ODB Found
7/31/2006 13:34:00:531 - Let>me=[email protected]
7/31/2006 13:34:00:531 - Let>myname="[email protected]"
7/31/2006 13:34:00:531 - Let>recipients=[email protected]
7/31/2006 13:34:00:546 - CountFiles>f:\macola70\data\*.od*,odbcount,0
7/31/2006 13:34:00:546 - label>ODBNotFound
7/31/2006 13:34:00:546 - Finished Macro : Notify Of ODB FailOver
This is a NetWare 6.5 network with the latest client (4.91 sp2). The workstation is Windows XP with current updates. Macro Scheduler is 8.03 upgraded from 7.4. The problems started occurring about 2-3 times a week after the upgrade. The macro runs continuously every 5 minutes. There are two identical macros running on the same machine that look at different directories on a windows server. I've not had a similar problem with those, but it is rare that either of those is triggered
Countfiles on a network drive
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Your script will always branch to ODBNotFound because of the spaces in this line:
if> %odbcount% > 5,ODBFound,ODBNotFound
This line needs to be:
if>%odbcount%>5,ODBFound,ODBNotFound
if> %odbcount% > 5,ODBFound,ODBNotFound
This line needs to be:
if>%odbcount%>5,ODBFound,ODBNotFound
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
JRL,
It is possible and even likely that one of the files is locked by the program that should be processing them, but the rest of them would not be. I'm not sure what process countfiles uses to count the files, but I wouldn't think that a file lock would hide the existence of the file. Also the lock would not clear, until after the it started working and I went to clear the error.
mtettmar,
Thank you, I will change that and see if it works. But it doesn't always branch to ODBNotFound. Most of the time it works as we want it to. Only on occasion does it fail, and then it begins working again after 2-3 hours.
Thanks,
Rob
It is possible and even likely that one of the files is locked by the program that should be processing them, but the rest of them would not be. I'm not sure what process countfiles uses to count the files, but I wouldn't think that a file lock would hide the existence of the file. Also the lock would not clear, until after the it started working and I went to clear the error.
mtettmar,
Thank you, I will change that and see if it works. But it doesn't always branch to ODBNotFound. Most of the time it works as we want it to. Only on occasion does it fail, and then it begins working again after 2-3 hours.
Thanks,
Rob
Re: Countfiles on a network drive
i am having the same issues right now, it cannot count files on a mounted network drive.