Question

Run a workbench with Directory Watch

  • 4 December 2017
  • 3 replies
  • 6 views

Badge +8

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.


3 replies

Userlevel 4
Badge +30

Hi @philippeb,

Has somes interesting links about Directory Watch:

Thanks,

Danilo

Userlevel 2
Badge +14

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

Badge +2

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

Reply