The SystemCaller may give you some options. Though it may be more practical to deal with the problem at source by forcing the local machine to shut down or close active tasks at a scheduled time...
Thanks Dave.
I have the programmers writing a simple .EXE ATM to do just this.
I had no idea FME could do this. I've only been using Workbench for 12 months but this product keeps amazing me!
You can do it in the batch file the you call through scheduler to run fme we have lots that do that sort of thing. For example here is a bit from a bat file we use:
::Run spatial parcel building before compress for occupancy procedure
fme.exe "C:\\GISprojects\\FME\\Daily\\Spatial Joins\\Spatial_parcel_BUILDINGS.fmw"
::Rename directory if it processed in morning
PUSHD C:\\GISProjects\\NaturalAreas\\ProcessedDataFiles
If EXIST %date% ren %date% %date%_AM"
POPD
:: Create dated directory
:: added only if the shape files exist in the directory MKDIR "C:\\GISProjects\\Road_patrol\\ProcessedDataFiles\\%date%"
echo Road Patrol Import Started - %date% >> C:\\GISProjects\\Road_patrol\\ProcessedDataFiles\\%date%\\Import_Summary.txt
::Mark
If EXIST C:\\GISProjects\\Road_patrol\\Data_CheckIN\\MARK\\ROAD_PATROL_POINT.shp MKDIR "C:\\GISProjects\\Road_patrol\\ProcessedDataFiles\\%date%"
If EXIST C:\\GISProjects\\Road_patrol\\Data_CheckIN\\MARK\\ROAD_PATROL_POINT.shp fme.exe "C:\\GISProjects\\Road_patrol\\FME\\Road_Patrol.fmw" --SourceDataset_SHAPE "C:\\GISProjects\\Road_patrol\\Data_CheckIN\\MARK\\*.shp" --ATTR_LIST VEHICLEID,Vehicle1,OPERATOR,MARK
If EXIST C:\\GISProjects\\Road_patrol\\Data_CheckIN\\MARK\\ROAD_PATROL_POINT.shp echo Import Mark's Road Patrol - %TIME% >> C:\\GISProjects\\Road_patrol\\ProcessedDataFiles\\%date%\\Import_Summary.txt
We have jut started changing our bat files over to python scripts that you run through a scheduled task. You can do a lot more using python so I would use it over bat to execute system commands. As a start this is how you call your fme workbench in python:
import os
os.system ('fme.exe "C:\\GISprojects\\FME\\Daily\\Cityworks\\Cityworks_Workorders.fmw"')