An approach could be to periodically run a quick query on the logs using the admin API , looking for log code 23840 (service published). Dump the datestamps in a file, then do a diff/compare against a file created from a previous run. If the result of the compare between the 2 files = false, run the script.
The response to the log query would be similar to the following.
{ "type": "INFO", "message": "Service published [name: 123123123123123; type: MapServer].", "time": 1511902237075, "source": "System/PublishingToolsEx.GPServer", "machine": "machine.domain.COM", "user": "0123456789ABCDEF::someuser", "code": 23840, "elapsed": "", "process": "24509", "thread": "112", "methodName": "pubSD.Execute" }, { "type": "INFO", "message": "Service published [name: ausmap_WFL1; type: FeatureServer].", "time": 1509544574338, "source": "System/PublishingTools.GPServer", "machine": "machine.domain.COM", "user": "someuser", "code": 23840, "elapsed": "", "process": "19996", "thread": "73", "methodName": "pubSD.Execute" },
Example: Query the ArcGIS Server logs—Documentation (10.3 and 10.3.1) | ArcGIS for Server