Send request to BP on production start

How do I send request on production start?

Here's what I got so far in my production class:

ClassMethod OnStart(pTimeStarted As %String) As %Status
{
    job ..InitialTraining()
    quit 1
}

lassMethod InitialTraining() As %Status
{
    hang 5
    set sc = ##class(EnsLib.Testing.Service).SendTestRequest(...)
    quit sc
}

Is there a better way without hang, etc?

 

Answers

Added a dummy BS to production with OnInit:

Class test.InitService Extends Ens.BusinessService
{

Parameter ADAPTER = "Ens.InboundAdapter";

Property Adapter As Ens.InboundAdapter;

Method OnProcessInput(pInput As %RegisteredObject, Output pOutput As %RegisteredObject) As %Status [ CodeMode = expression ]
{
$$$OK
}

/// This user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP()
Method OnInit() As %Status
{
    $$$TRACE("INIT")
    set sc = ..SendRequestAsync(...)
    quit sc
}