You can call this function from anywhere in your backend to send an event. The other way to send an event is by using io.sendEvent() from inside a run() function.
The payload property will be sent to any matching Jobs and will appear
as the payload param of the run() function. You can leave this
parameter out if you just want to trigger a Job without any input data.
The optional context property will be sent to any matching Jobs and will
be passed through as the context.event.context param of the run()
function. This is optional but can be useful if you want to pass through
some additional context to the Job.
This is optional, it defaults to the current timestamp. Usually you would
only set this if you have a timestamp that you wish to pass through, e.g.
you receive a timestamp from a service and you want the same timestamp to
be used in your Job.
An optional Date when you want the event to Trigger Jobs. The event will
be sent to the platform immediately but won't be acted upon until the
specified time.
An optional number of seconds you want to wait for the event to Trigger
any relevant Jobs. The event will be sent to the platform immediately but
won't be acted upon until the specified time.