AbstractThe description of the Task (default this.name)
OptionalfrequencyHow often to run this Task, in ms. 0 is non-recurring. (default: 0)
OptionalinputsThe inputs of the Task (default: {})
OptionalmiddlewareThe Middleware specific to this Task (default: []). Middleware is described by the string names of the middleware
The name of the Task
OptionalpluginOptions for the node-resque plugins.
OptionalpluginsPlugins from node-resque to use on this task (default: []). Plugins like QueueLock can be applied
The default queue to run this Task on (default: 'default')
OptionalreRe-enqueuing a periodic task in the case of an exception. (default: false)
AbstractrunThe main "do something" method for this task. It can be async. Anything returned from this method will be logged.
If error is thrown in this method, it will be logged & caught. Using middleware, you can decide to re-run the task on failure.
this is a Task instance itself now.
Inputs:
worker.job and set worker.result explicitly if your Task does not return a value.Optionalvalidate
Create a new Actionhero Task. The required properties of an task. These can be defined statically (this.name) or as methods which return a value.