I am attempting to append records to an ArcGIS Enterprise Portal table from a Postgres database using an SQL statement.
I have a SQL statement that works correctly to query the database. I can use this in the SQL Creator Transformer and connect it to an Esri ArcGIS Portal Feature Service writer in FME Workbench. I can run this in FME workbench, and the records successfully write to the Portal table. The project works on my local machine and on the network server we plan to use for scheduled tasks. FME is installed on the server.
I would like to run this on a 12-hour interval using Windows Task Scheduler.
Here's what I've tried:
- Copied the "header text" from the log in FME Workbench, and saved this as a .BAT file.
- Placed the .FMW and .BAT files in the same directory on a network server, and edited the .BAT file to point to the .FMW file in its new location.
- I created a new scheduled task in Windows Task Scheduler to Start a program, and pathed to the .BAT file.
- Nothing is written to the Portal table when the Task is Run.
- Note: Running the project in FME Workbench on this machine writes records to the Portal table successfully.
Here are the .BAT file contents:
C:\\Program Files\\FME\\fme.exe C:\\RUN\\FME\\snow_events\\snow_events.fmw
--SourceDataset_POSTGRES weatherPost
--SourceDataset_POSTGRES_5 weatherPost
--DestDataset_ARCGISPORTALFEATURES https://maps.gov.yk.ca/portal
I have set up and run scheduled tasks in Windows Task Scheduler before. I have not done this with FME files. Can someone help me learn what I am missing?
Thanks for any help.