Home/Blog /3 tips to help prevent your scheduled tasks from failing in FME

3 tips to help prevent your scheduled tasks from failing in FME

More and more FME users are using the Windows task planner to automatically run FME “workspaces.” While the tool is relatively easy to use, certain tasks sometimes fail during the process. Because these tasks are often scheduled for after work hours, it is even more important to ensure they run properly. These tips will help reduce the likelihood of you returning to the office to find that a task has failed.

                                                      Create the batch file (.bat) correctly

To create the batch file, open a new file in Notepad and add the extension “.bat” when saving the file. 

Image1_tache_automatisé

The first command should launch the fme.exe file. If you have more than one version of FME installed on your workstation, you should add the entire path where the fme.exe file is located to the desired version to ensure that it starts. The second command will launch the .fmw file. You can also set the source and destination datasets as parameters from the same command line to avoid opening the .fmw file in question. Here is an example:

"C:\Program Files\FME_2015.1.0.1_64bit\fme.exe"

C:\Users\Documents\FME\Workbench_Test.fmw --SourceDataset_JPEG ".\Images\*.jpg" --DestDataset_CSV "C:\Users\Documents\FME\"

 

                                                                        Define the “start in” value

If your batch file contains relative paths for source or destination datasets (e.g., SourceDataset_JPEG ".\Images\*.jpg"), it is recommended to save the batch file in the same folder as the .fmw file. Moreover, make sure to indicate the path of the .fmw file in the “Start in (optional):” section when creating the task. If this path is not defined, the task planner will be unable to find the relative paths because the batch file will define the Windows folder as the parent folder (e.g., C:\Windows\system32).

 

Image2_tache-Automatisé

                                               Standardize your mapped network drives

A connection to a network drive may differ from one workstation to another (e.g., Z:\Documents\FME). If your workspace is programmed to connect to network drives for source or destination datasets, make sure to include the entire path (e.g., \\serveur\partage\FME).

 

For more information on running FME workspaces from a command line, consult the following article:

https://knowledge.safe.com/articles/How_To/Batch-Processing-Method-1-Command-Line-or-Batch-File

 

Patrick Connolly-Boutin

Consultant in Geomatics

icon-info-gros
Want to know more ?
Send by EmailPrint
AutodeskSafe SoftwareCodebook

Partners

Autodesk
Consortech
6300 Auteuil. Suite 505
Brossard (QuEbec)
J4Z 3P2  Canada
Toll Free
1 888 276-0543
Follow us on LinkedIn
ConsortechETL Interest Group