Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


shart
  •  shart
  • No customer Topic Starter
2009-06-27T23:34:09Z
This seems like it should be easy, but I must be doing something wrong because I can't seem to come up with a combination of things that works the way I expect it to.

What I want to do is to monitor a directory, move each new file to a different directory, and log the filename to a sql database using a stored procedure. However, if more than one file is added to the monitored directory at a time, it logs only one of the files. I'm not sure what combination of Triggers/Task/Notification/variables etc. will allow me to log each filename individually. I feel like I must be missing something obvious, but any pointers would be greatly appreciated!

Sponsor
Forum information
Support
2009-06-27T23:46:24Z
Check the "Put Job in queue if already running" on Main settings of Job. This will prevent multiple executions at a time which gives the results you describe.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
shart
  •  shart
  • No customer Topic Starter
2009-06-28T02:37:21Z
That worked, thanks; I thought I had already tried that but perhaps I didn't test it well enough.

Also, I'm having trouble with one other thing; I have a SQL task that executes a sql server stored procedure containing the full path name from the last trigger. It sends that parameter as a varchar to the stored procedure, which is defined as varchar(4000). It executes fine, but it always truncates the path name to 50 characters. I've executed the same procedure outside of visual cron successfully, so I know it's not a problem with the table or stored procedure. Is there any way to specify the length of the input variable so that it won't be chopped off? It also works correctly (without truncating) from visual cron if i specify the path and filename without using the variable. Perhaps i've defined the variable incorrectly somehow, but it appears to have the right value, just truncated - i'm using {TRIGGER(Active,LastTrigger,File.Result.FullPath)}
Support
2009-06-28T10:51:59Z
Is it truncated in the middle of a "word" or at a blank space?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
shart
  •  shart
  • No customer Topic Starter
2009-06-28T13:51:43Z
A "word". The file name is like this: AAAAaaaaaa-NNNNNNNNNN[N].XML, where Aa are uppercase letters and lowercase respectively, N is a number, and [] are brackets. I consistently get AAAAaaaaaa-NNNN (15 chars) in the database, although if i rename the file so that the path and filename together are less than 50 chars, it works without a problem. The path is 35 chars.

One thing I've noticed which may not be related at all is that when I go in to edit a parameter i've previously created, it doesn't show the data type I previously selected, it always shows the first in the list (BigInt). If I reselect varchar and choose ok, then go back to edit the param again, it always still shows bigint. It may be that this is stored correctly and just not showing correctly in the drop down, but I thought i'd mention it.
Support
2009-06-28T14:02:11Z
Which version of SQL server are you using and could you attach the stored procedure definition and we will test this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
shart
  •  shart
  • No customer Topic Starter
2009-06-29T18:30:14Z
Sure, thanks a lot. I've tried it with both SQL 2005 and SQL 2008.
File Attachment(s):
visualcronsample.txt (2kb) downloaded 56 time(s).
Scroll to Top