- Posts: 109
Notifications per each file
- JD Cox
- Topic Author
- Offline
- User
Less
More
3 years 2 months ago - 3 years 2 months ago #3635
by JD Cox
Notifications per each file was created by JD Cox
We just downloaded FH Server, love it.
I set up a test for File Monitor with an email notification.
When the task is triggered it runs a prompt to concatenate the *csv files and moves the cat file to a processed folder.
Then an email notification is sent. All that works great, the only issue I have is it sends an email for every file that gets concatenated.
Is there a way now or possibly in an update to control or limit it to one email notification?
Thanks JD
I set up a test for File Monitor with an email notification.
When the task is triggered it runs a prompt to concatenate the *csv files and moves the cat file to a processed folder.
Then an email notification is sent. All that works great, the only issue I have is it sends an email for every file that gets concatenated.
Is there a way now or possibly in an update to control or limit it to one email notification?
Thanks JD
Last edit: 3 years 2 months ago by JD Cox.
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
3 years 2 months ago - 3 years 2 months ago #3636
by FlowHeater-Team
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Replied by FlowHeater-Team on topic Notifications per each file
Hi JD,
This is currently not possible but you could to it with two additional dummy tasks.
Create a new file monitoring task “trigger task”, triggered by a file (new and modify) e.g. trigger.txt. This one includes a simple CMD or PowerShell script. The script only checks whether your *.csv files folder is empty and the trigger file trigger.txt still exist. In case yes just copy your concatenated *.csv file to another folder and delete the trigger.txt file.
Note: In this task you have to configure a delayed execution, I guess 5 or 10 seconds should be enough.
Create a second new file monitoring task “send mail task”, triggered by your copied concatenated *.csv file, see above. In this task you run just a dummy FlowHeater definition that creates a new CSV file from the origin CSV file. In this task you send now your desired email just once
In your original task you have to add an additional step at the end. The Step should just append a line into the trigger.txt file. e.g cmd.exe /C “echo dummy >> C:\Temp\trigger.txt”. With this you trigger the “trigger task”, see above.
Now FlowHeater Server should send just one big CSV file via Email.
This is currently not possible but you could to it with two additional dummy tasks.
Create a new file monitoring task “trigger task”, triggered by a file (new and modify) e.g. trigger.txt. This one includes a simple CMD or PowerShell script. The script only checks whether your *.csv files folder is empty and the trigger file trigger.txt still exist. In case yes just copy your concatenated *.csv file to another folder and delete the trigger.txt file.
Note: In this task you have to configure a delayed execution, I guess 5 or 10 seconds should be enough.
Create a second new file monitoring task “send mail task”, triggered by your copied concatenated *.csv file, see above. In this task you run just a dummy FlowHeater definition that creates a new CSV file from the origin CSV file. In this task you send now your desired email just once
In your original task you have to add an additional step at the end. The Step should just append a line into the trigger.txt file. e.g cmd.exe /C “echo dummy >> C:\Temp\trigger.txt”. With this you trigger the “trigger task”, see above.
Now FlowHeater Server should send just one big CSV file via Email.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Last edit: 3 years 2 months ago by FlowHeater-Team.
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
3 years 2 months ago - 3 years 2 months ago #3637
by JD Cox
Replied by JD Cox on topic Notifications per each file
Thanks for the help. For the most part I used option two. I removed the notification from the original task and created a new task, monitoring the processed folder. When a new file is detected it performs this task running command:
@echo off
REM DUMMY TRIGGER FOR EMAIL NOTIFICATION WHEN AN ORDER FILE IS READY TO IMPORT
Exit
The command does nothing. But, it satisfies the task performance, then the one and only email notification is sent.
JD
@echo off
REM DUMMY TRIGGER FOR EMAIL NOTIFICATION WHEN AN ORDER FILE IS READY TO IMPORT
Exit
The command does nothing. But, it satisfies the task performance, then the one and only email notification is sent.
JD
Last edit: 3 years 2 months ago by FlowHeater-Team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.263 seconds