New Feature: App Scheduled Tasks

A new sub-entity called Taskhas been added to Apps. Task sub-entities can be listed, created, modified, and deleted as shown below:

API has been deployed. Usage is as follow:

GET v3/apps/:ref/tasks

POST v3/apps/:ref/tasks

Periodic:

{
    "type": "periodic",
    "id": "periodic_task",
    "method": "_mtd_647644675894076344",
    "parameter": "Hï",
    "disabled": false,
    "period": "1 minute"
}

Possible unit of period are:

  • millisecond
  • second
  • minute
  • hour

Weekly:

Note that time should be stored in UTC. We can ask time in user's time zone (or browser time) but we should store in UTC.

{
    "type": "weekly",
    "id": "weekly_task",
    "method": "_mtd_647644675894076344",
    "disabled": false,
    "instant": {
        "day": "wednesday",
        "time": "07:30:00"
     }
}

Sharp:

Note that time should be stored in ISO8601 format.

{
    "type": "sharp",
    "id": "sharp_task",
     "method": "_mtd_647644675894076344",
     "disabled": false,
     "instant": "2019-06-19T07:51:00Z"
}

Update task:

PUT v3/apps/:ref/tasks/:id

Delete task:

DELETE v3/apps/:ref/tasks/:id