Hi,
I have a workflow that is going to run in a server. I would like to schedule it twice. When it detects a file on the first run, it will automatically run. But it will no longer run on the second schedule. But if on the first run, it does not detect the file, it will not run. On the second run, if it detects, it will run. I am using a directory tool to point the folder or files location. I would like it to create a log that will contains the filenames and dates.
Please show me a sample workflow on how to do it.
Thanks,
Kamen
Solved! Go to Solution.
@KamenRider
What you can do is:
To not run if there is no file, add a Count Tool and if it is equals 0 then the automation will stop.
For your 2nd scenario, create an output file that contains the file that was processes in the first run. Connect that file to the automation and check if it equals to the file that is run at the 2nd time, if yes, then the flow stops.
Hi @OTrieger
Could you please attach a sample workflow that demonstrates how it stops if it equals the run at the second iteration? I'd like to see the scenario.
Thanks!
Kamen
Here you have a link that explaining how to do it
https://knowledge.alteryx.com/index/s/article/Stop-workflow-on-a-condition-1583459852794
Thanks @OTrieger for the link. The workflow only stops if there are no records. If I schedule it three times a day and records are found on the second attempt, an email is sent. On the third attempt, it sends another email. I want it to stop on the third attempt since the email has already been sent. Do you have an example of how to achieve this?
Hope to hear from you and any ideas from anyone.
Kamen
HI anyone here who can give me a sample workflow regarding this scenario that will be run in the sever -
If I schedule it three times a day and records are found on the second attempt, an email is sent. On the third attempt, it sends another email. I want it to stop on the third attempt since the email has already been sent.
Thanks,
Kamen
Could you assist me with ensuring my workflow sends an email only once, even though it runs three times on the server? I plan to schedule it three times based on when results are available. Below is my workflow. The output file overwrites the Email Status file to 1 if it sends email, however this is not happening.
Can someone here to kindly please help me for the solution.
Thanks and hoping to hear from anyone.
Kamen
@KamenRider what is the requirement here? i am not able to follow your request, are you saying the workflow should send one email in a day, and if an email sent in the first run the the second and third run it should not sent?
Hi @binuacs
Thanks for the response. Here's my explanation:
### Workflow Schedule
The workflow is set to run on the server three times between Tuesday and Wednesday. This scheduling is contingent on when the necessary file is ready. The workflow will automatically execute at the scheduled times and send a notification email once the file is detected.
### File Availability
If the file isn’t available on Tuesday, the workflow will still run, but no email notification will be sent. Conversely, if the file is ready on Wednesday, an email notification will be dispatched.
### Subsequent Schedules
On the third scheduled run, since an email has already been sent, the workflow will execute but will not send another email notification. The same applies if an email was sent during the first schedule; it will not issue additional notifications during the second or third runs.
### Conclusion
In summary, the workflow operates based on the file's availability, sending notifications only when necessary, and preventing duplicate emails in subsequent runs.
Please let me know if you have any questions.
Kamen