Scheduling Tasks And Workflows From A Workflow


We can programmatically schedule recurrent processing of a task or a workflow from the handle or onEvent generator functions.

# Scheduling a task

module.exports.handle = function* (...) {
  ...
  this.schedule("<cron expression>").task("<task name>", ...<task input>);
  ...
};

"<cron expression>" format is described here.

# Scheduling a workflow

module.exports.handle = function* (...) {
  ...
  this.schedule("<cron expression>").workflow("<workflow name>", ...<workflow input>);
  ...
};

"<cron expression>" format is described here.

WARNING

Currently, there is no way to programmatically delete a schedule. It should be done manually on the dashboard.