In know of a few cmd-line programs that can write to the eventlog calling them from a workbench is one way to go or are there better options ?
We have a bunch of jobs running on FME Desktop, these jobs are run by windows scheduled tasks. However we are migrating to FMEServer and plan to schedule the jobs with the builtin scheduler. The problem is that in order for our outsourcing-partner to easily monitor these jobs it would be ideal if FME could write to the windows eventlog. Has anyone out there done this ?
Page 1 / 1
You can use a python caller to execute the following script
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
You can use a python caller to execute the following script
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
Sorry for the clumsy formatting, here is the script again:
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
You can use a python caller to execute the following script
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \\"Job Failed\\""
subprocess.call(s, shell=True)
pass
You can use a python caller to execute the following script
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \"Job Failed\""
subprocess.call(s, shell=True)
pass
import fme
import fmeobjects
import subprocess
# Template Function interface:
def WriteEvent(feature):
s = "eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D \"Job Failed\""
subprocess.call(s, shell=True)
pass
You can format it using the CODE tag, like this:
import fme
import fmeobjects
import subprocess
def WriteEvent(feature):
s = 'eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO FMEJOBFAILURE /D "Job Failed"'
subprocess.call(s, shell=True)