How time critical is it? Does it really need to run immediatelly? Rather build a automation policy with an SQL query for the service state. It gets reported by basic inventory.(standard basic inventory schedule is 1 day) So if you want to have it more immediate do the following.
Just build a client job, first sending a task to the client to send the basic inventory ASAP.
Second use one of the ASDK sample scripts to trigger the automation policy. Put this script in an task server task, this way it can be run in the client job. Just remember if you have other task servers then your NS you will need to install the ASDK components on it.