[tasks.create]

tasks.create is a slot in the tasks namespace, in Hyperlambda, the language of Magic Cloud. Saves a named task containing a Hyperlambda body that can later be scheduled or executed on demand.

  • Value (task-id), optional: Task ID to create

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
[.lambda] lambda yes Task body serialized and executed later.
[id] string no Task ID, used in place of the slot’s value.
[description] string no Optional task description.
[due] DateTime no Optional one-time due date.
[repeats] string no Optional repeat pattern.

Guide

How to use tasks.create

JSON declaration

This is the complete declaration of tasks.create, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "tasks.create",
  "description": "Saves a named task containing a Hyperlambda body that can later be scheduled or executed on demand",
  "signature": {
    "input": {
      "kind": "task-id",
      "description": "Task ID to create",
      "required": false,
      "mode": "ValueOrExpression"
    },
    "children": {
      "id": {
        "type": "string",
        "kind": "task-id",
        "description": "Task ID, used in place of the slot's value",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "role": "Option",
        "projection": "Value"
      },
      "description": {
        "type": "string",
        "kind": "task-description",
        "description": "Optional task description",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "role": "Option",
        "projection": "Value"
      },
      "due": {
        "type": "DateTime",
        "kind": "date",
        "description": "Optional one-time due date",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "role": "Option",
        "projection": "Value"
      },
      "repeats": {
        "type": "string",
        "kind": "task-repeat-pattern",
        "description": "Optional repeat pattern",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "role": "Option",
        "projection": "Value"
      },
      ".lambda": {
        "type": "lambda",
        "description": "Task body serialized and executed later",
        "required": true,
        "mode": "ExecutableLambda",
        "cardinality": "ExactlyOne",
        "role": "LambdaBlock",
        "evaluation": "SerializeLambda",
        "projection": "Children"
      }
    }
  }
}

← tasks.count all tasks.* slots tasks.delete →