Scheduling Jobs
From fmepedia
(http://fmepedia.com/index.php/Category:FME_Server)
FME Server 2010 doesn't have the ability to schedule translations. This functionality is left to external applications. There are a number of applications and methods for scheduling jobs, some of which are presented here.
Windows Scheduled Task + FME Server Console
In this example, the Samples/austinApartments.fmw repository/workspace that is provided with FME Server will be scheduled to run every 15 minutes.
Create the bat file containing the FME Server Console command
- Open the FME Server Console:
- <FMEServerDir>\Clients\FMEServerConsole\fmeserverconsole.exe
- Determine the names of the published parameters (bboxWest and bboxEast in this example).
- Create a command to run the workspace an try it out (note the syntax for specifying published parameters):
- run_workspace Samples/airports.fmw --bboxWest -100 --bboxEast 100
- If you have security enabled you will need to include parameters for your user name and password. The syntax to use is like this:
- OPT_username admin
- OPT_password admin
- Create a bat file that contains the command to run:
- "<FMEServerDir>\Clients\FMEServerConsole\fmeserverconsole.exe" run_workspace Samples/airports.fmw --bboxWest -100 --bboxEast 100 OPT_username admin OPT_password admin
- Try out the bat file by double clicking on it or running it in the command prompt.
Create the Windows Scheduled Task
- Open the Windows Control Panel > Scheduled Tasks > Add Scheduled Task
- Go through the Scheduled Task Wizard and use the following settings:
- Program to run: the bat file you created.
- Perform this task: Daily (we will change this later).
- Check on the "Open advanced properties..." checkbox.
- In the Task's Advanced Properties dialog
- Click the Schedule tab.
- Click the Advanced button.
- Check on "Repeat task".
- Beside "Every", enter 15 Minutes.
