Skip to content
← Back to Index

scheduleJob

Keyword

 scheduleJob( jobDefinitionId: text at: instant argument: { }|nothing ): uuid | Error

The scheduleJob function allows Reactors to create Jobs that runs a Reactor method at a given time in the future.

Availability

DiscountRuleReactor

Return Value

The return value is the ID of the Job that was created.

Error Handling

Error may be returned if the specified reactorId or method doesn't exist, or the given argument is invalid.

Examples

filtrera
from scheduleJob(
  'myReactor'
  'myMethod'
  now + 2 hours
) match
  Error |> 'An error occurred'
  (jobId: uuid) |> jobId

© 2024 Hantera AB. All rights reserved.