Skip to main content
Question

Run a workbench with Directory Watch

  • December 4, 2017
  • 3 replies
  • 49 views

philippeb
Enthusiast
Forum|alt.badge.img+22

Hello!

I'm new with FME Server (very happy user!) and I was wondering if the Directory Watch can do what I want to do.

I want to run a FME workbench each time a file is added to my directory. I want to watch the directory each hour. Can I do that?

Second thing, I want to do the opposite. I want to abort a scheduled FME workbench when I detect a particular file into a directory. Can I do that?

Thanks a lot.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2077 replies
  • December 4, 2017

Hi @philippeb,

Has somes interesting links about Directory Watch:

Thanks,

Danilo


LizAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • 1543 replies
  • December 4, 2017

Hi @philippeb, Happy to hear you are enjoying FME Server. Here is a tutorial series that should get you off and running using Directory Watch:

Tutorial: Directory Watch, particularly the Directory Watch Publisher with Idle Time Delay (Advanced) (2017) will be useful for your examples.

To abort a scheduled workspace, I would suggest using a combination of the Directory Watch Reader, a tester (to test for the file you don't want) and a terminator, along with the workspace runner.

Let me know if you have any questions regarding the articles, you can comment on the articles directly.

-Liz


Forum|alt.badge.img+2
  • 364 replies
  • December 4, 2017

Hi @philippeb

 

 

1.

 

When setting up the Directory Watch Publication you can set it to run every hour and see if any files have been created in that folder. You will also get 1 topic message for every new file that appears in that folder. For every time that topic is triggered you can get a workspace to run. Just make sure that when you create a workspace subscription that will trigger off the same topic that you're publishing to with the directory watch.

 

 

 

 

2.

 

I don't believe that you can abort/skip workspaces that are scheduled to run. You can remove a schedule completely but not skip a scheduled run. You could always add this to the Ideas Exchange if you wanted.

 

What's available to do with schedules you could find in our REST API documentation: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/#!/schedules