Original question
Hello,
I'm hoping that I can have a general adapter run automatically at midnight such that it will produce an up-to-date time-series dataset read by an external API. Essentially I have data being entered daily into a SQL database from which I'd like to leverage FEWS to do the data processing before exposing it though my API.
My question is: What would be the best way to make this happen? Would I go through scheduler (either Windows Task Scheduler or Crontab on Linux) to somehow call the FEWS forecast, or is there some capability already built into FEWS? If so, how would I go about that?
Solution
There are multiple ways to deal with this. The best solution is of course an Operator Client setup, as that is designed for these operational activities. But I can imagine you do not want to go that route and want to stick to a Stand Alone setup.
I suggest you take a look at the following wiki pages, that give some options and examples.
https://publicwiki.deltares.nl/display/FEWSDOC/03+Testing+workflows+with+the+WorkflowTestRunner+in+SA+mode
https://publicwiki.deltares.nl/display/FEWSDOC/How+to+configure+a+workflow+test+run.++Running+workflows+from+the+command-line#Howtoconfigureaworkflowtestrun.Runningworkflowsfromthecommand-line-Since2018.02
https://publicwiki.deltares.nl/display/FEWSDOC/03+Setting+Up+Scheduled+Forecasts
Note: there are some caveats to this approach. You will have to test if this is a problem (or not) in your application.