Submit Hierarchy job count

Post Reply
franklintempleton
Newbie
Posts: 12
Joined: Fri Nov 19, 2021 8:15 pm

Submit Hierarchy job count

Post by franklintempleton »

Hope someone can help me with this. I am using a submit hierarchy to monitor a group of folders on a server. The folders are named for the individuals that have access to drop files into the folders. Using Windows share permissions they only have access to their personal folder.

What I want Switch to do is send email notification when files are received, which is easy enough when the user submits a folder of files or a zip with files the result is one email notification. If the user drops many individual files then Switch treats them as individual jobs and the user gets "X" number of emails which is not a great user experience. I cannot seem to use Assemble Job in a way that will collect the individual files for email so that each user only receives notifications about their own jobs and only one email per user/session. I am using a Job Assembly with Custom scheme and the job identifier pointed to the folder name in the hierarchy but I cannot seem to create a counter for the Number of files so Switch knows when the assembly is complete. Is there a better way to do this?
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: Submit Hierarchy job count

Post by laurentd »

Well, you don't know in advance how many files will be added to a folder.
In the Assemble Job properties, you can define a very large number of jobs to wait for (Every N jobs), (a number you will never reach), and an orphan timeout value.
When the first file arrives, Switch will wait n minutes (the timeout value), then assemble all the files it got for that particular individual / subfolder.
Laurent De Wilde, Solution Architect @ Enfocus
franklintempleton
Newbie
Posts: 12
Joined: Fri Nov 19, 2021 8:15 pm

Re: Submit Hierarchy job count

Post by franklintempleton »

That worked great. Thanks for the feedback.
Post Reply