Advertisement
bahman

lemmy-meter - Scheduled downtime JSON schema

Oct 17th, 2023 (edited)
920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.57 KB | Source Code | 0 0
  1. {
  2.   "$schema": "https://json-schema.org/draft/2020-12/schema",
  3.   "$id": "https://lemmy-meter.info/scheduled-downtime.schema.json",
  4.   "title": "Planned Downtime",
  5.   "description": "Lemmy instance planned/scheduled downtime",
  6.   "type": "object",
  7.   "properties": {
  8.     "schedule": {
  9.       "type": "object",
  10.       "properties": {
  11.         "once": {
  12.           "description": "One off downtime periods.",
  13.           "type": "array",
  14.           "items": {
  15.             "type": "object",
  16.             "properties": {
  17.               "when": {
  18.                 "description": "UTC Timestamp in YYYY-mm-dd HH:MM format. ""type": "string",
  19.                 "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$"
  20.               },
  21.               "duration": {
  22.                 "description": "Duration in minutes.",
  23.                 "type": "integer",
  24.                 "minimum": 1
  25.               }
  26.             }
  27.           }
  28.         },
  29.         "recurring": {
  30.           "description": "Recurring downtime periods.",
  31.           "type": "array",
  32.           "items": {
  33.             "type": "object",
  34.             "properties": {
  35.               "cron": {
  36.                 "description": "UTC Cron schedule.  See https://crontab.guru",
  37.                 "type": "string",
  38.                 "pattern": "^((([0-9]+,)+[0-9]+|([0-9]+[/-][0-9]+)|[0-9]+|.*) ?){5,7}$"
  39.               },
  40.               "duration": {
  41.                 "description": "Duration in minutes.",
  42.                 "type": "integer",
  43.                 "minimum": 1
  44.               }
  45.             }
  46.           }
  47.         }
  48.       }
  49.     }
  50.   }
  51. }
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement