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.


aknudsen
2015-10-29T13:17:45Z
I have a job that downloads a file using an http task. There is a subsequent task that copies that file to a share from the local directory. The copy file task is failing about 1 time in 20. Whenever I check the local folder, I see that the file exists.
The message in the task is "Exception in Task: System.Exception: No file(s) copied".

This is a new job, so I cannot say if this problem did or did not exist before 7.7.7.

After introducing a retry on error, we now get the following error when it fails (still intermittent):
Exception in Task: System.NotSupportedException: The given path's format is not supported.
at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption, Boolean checkHost)
at System.IO.Directory.InternalGetFiles(String path, String searchPattern, SearchOption searchOption)
at VisualCronService.SearchAPI.GBOJMALLCMLMLNHFKFPIIPCCIDNIICBOHHBM(FileFilterClass , VariableReplacerClass ) in C:\sourcefiles\code\VisualCronService\Jobs\FileFilter\SearchAPI.vb:line 217
at OBOKIIHBDBPMCFALPGECCIFHCDJPEDKODDGK.DKAFLEHHMFAPJOFJIFLJPAIDDJIEENMANICP.POMGLMOALKCPPIBJEOFCDCDGENCDADIHOMKJ(TaskCopyFileItemClass ) in C:\sourcefiles\code\VisualCronService\Jobs\TaskProcesses\File\clsProcessTaskCopyFiles.vb:line 106
Exception in Task: System.Exception: No file(s) copied
Sponsor
Forum information
thomas
2015-10-29T18:08:59Z
There might be a small timelag between when the first task finishes, and the downloaded files are actually available on the local drive. I have had the same issue with an email trigger, where attachments were downloaded and saved to drive. Try adding a wait task between the two tasks, and see if the problem disappears.

Thomas
aknudsen
2015-10-29T19:00:26Z
It seems the retry error was misleading. It was getting a different error because I was using PrevTask to examine variables from the http task. When running a retry, the PrevTask must be the last failed execution of the File Copy task.

It seems the actual problem was that I was using a datetime variable as part of my generated file name. When I reach back to the http task and get the file name variable it was recaculating the current time. When the http task ran at the end of a minute and the file copy task ran at the start of the next minute, the calculated file name was different.

Value in the "File name" text box:
{JOB(Active|Variable|ReportName)}_{JOB(Active|Variable|OrganizationName)}_{JOB(Active|Variable|FilePostFix)}_{DATEFORMAT(yyyyMMddhhmm)}.{JOB(Active|Variable|ReportFileExtension)}

Value used in the Copy Files task:
{TASK(PrevTask,FileName)}

I corrected this by creating a new job variable and assigning that when the job was started and switching the "File name" value to the following:
{JOB(Active|Variable|ReportName)}_{JOB(Active|Variable|OrganizationName)}_{JOB(Active|Variable|FilePostFix)}_{JOB(Active|Variable|ReportTimestamp)}.{JOB(Active|Variable|ReportFileExtension)}
Support
2015-11-02T10:12:48Z
Thanks for the feedback!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top