Add more cron-plus testing

This commit is contained in:
2025-05-29 17:21:44 -04:00
parent d33b2d5bf1
commit e933903cfb

View File

@ -2895,7 +2895,7 @@
"h": 82
},
{
"id": "af7782943343a759",
"id": "ac8b0a46f1caa685",
"type": "group",
"z": "d49b385d8b582b20",
"name": "Cron Plus Tester",
@ -2903,6 +2903,37 @@
"label": true
},
"nodes": [
"ac3afbb7.56f7a8",
"65892a57.612d44",
"e55fda59.f37f18",
"8a452815.9ceb68",
"e60daf12.48c83",
"16c930f5.ec3a9f",
"ad104abb.fc4a28",
"9126a056.6de91",
"e8abe66.6a0aa18",
"9e8a3202.ae3d9",
"276fbb6f.b78e94",
"540f9bdc.808cf4",
"f7509f08.69bb9",
"e057de86.30bfa",
"b247f14a.cf2f",
"6ea9b27a.04bf6c",
"4a1dc32e.9dbf1c",
"6dde0693.66ed08",
"27e00c01.1fd474",
"221cb0d1.2321f",
"482be49c.66898c",
"3c39c8ac.e11a08",
"7945501b.3547",
"7ad3fa7f.e3acd4",
"5f323eb9.e9f7d",
"48b74cdb.647ea4",
"94553308.0c403",
"2db145e3.78f78a",
"9ac1b61.86b6d48",
"81b4094b.d0d778",
"b3512276.df97c",
"3696700bebc8823a",
"ed094c20ad524768",
"cafa8a6b489484b7",
@ -2911,8 +2942,8 @@
],
"x": 794,
"y": 519,
"w": 392,
"h": 262
"w": 872,
"h": 1102
},
{
"id": "fba69dfc80829db7",
@ -39447,7 +39478,7 @@
"id": "3696700bebc8823a",
"type": "cronplus",
"z": "d49b385d8b582b20",
"g": "af7782943343a759",
"g": "ac8b0a46f1caa685",
"name": "",
"outputField": "payload",
"timeZone": "",
@ -39482,7 +39513,7 @@
"solarEvents": "sunriseEnd,sunsetStart"
}
],
"x": 900,
"x": 920,
"y": 660,
"wires": [
[
@ -39503,7 +39534,7 @@
"id": "ed094c20ad524768",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "af7782943343a759",
"g": "ac8b0a46f1caa685",
"name": "debug 1",
"active": false,
"tosidebar": true,
@ -39513,7 +39544,7 @@
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"x": 1100,
"y": 560,
"wires": []
},
@ -39521,7 +39552,7 @@
"id": "cafa8a6b489484b7",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "af7782943343a759",
"g": "ac8b0a46f1caa685",
"name": "debug 2",
"active": false,
"tosidebar": true,
@ -39531,7 +39562,7 @@
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"x": 1100,
"y": 620,
"wires": []
},
@ -39539,7 +39570,7 @@
"id": "2f01ee1169769867",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "af7782943343a759",
"g": "ac8b0a46f1caa685",
"name": "debug 3",
"active": false,
"tosidebar": true,
@ -39549,7 +39580,7 @@
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"x": 1100,
"y": 680,
"wires": []
},
@ -39557,7 +39588,7 @@
"id": "4d4d04563f14bf1e",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "af7782943343a759",
"g": "ac8b0a46f1caa685",
"name": "debug 4",
"active": false,
"tosidebar": true,
@ -39567,8 +39598,743 @@
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"x": 1100,
"y": 740,
"wires": []
},
{
"id": "ac3afbb7.56f7a8",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "describe 0 */5 * * * MON *",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\":\"describe\",\"expression\":\"0 */5 * * * MON *\"}",
"payloadType": "json",
"x": 1230,
"y": 840,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "65892a57.612d44",
"type": "cronplus",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "",
"outputField": "payload",
"timeZone": "",
"storeName": "",
"commandResponseMsgOutput": "output2",
"defaultLocation": "",
"defaultLocationType": "default",
"outputs": 2,
"options": [
{
"name": "e15",
"topic": "Every 15",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 15,30,45 * * * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
},
{
"name": "noon",
"topic": "noon",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 0 12 * * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 1260,
"y": 1140,
"wires": [
[
"8a452815.9ceb68"
],
[
"e60daf12.48c83"
]
]
},
{
"id": "e55fda59.f37f18",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Get list of schedules",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "list-all",
"payload": "",
"payloadType": "date",
"x": 1210,
"y": 920,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "8a452815.9ceb68",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Sched Trigger",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1480,
"y": 1100,
"wires": []
},
{
"id": "e60daf12.48c83",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Control Reply",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1480,
"y": 1140,
"wires": []
},
{
"id": "16c930f5.ec3a9f",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "add every 6 (maxCount 3)",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "add",
"payload": "{\"command\":\"add\",\"name\":\"every 6\",\"expression\":\"*/6 * * * * * *\",\"type\":\"default\",\"limit\":3}",
"payloadType": "json",
"x": 950,
"y": 980,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "ad104abb.fc4a28",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "remove every 6",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "remove every 6",
"payload": "{\"command\": \"remove\", \"name\":\"every 6\"}",
"payloadType": "json",
"x": 920,
"y": 1020,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "9126a056.6de91",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "stop every 6",
"props": [
{
"p": "payload",
"v": "{\"command\": \"stop\", \"name\":\"every 6\"}",
"vt": "json"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\": \"stop\", \"name\":\"every 6\"}",
"payloadType": "json",
"x": 910,
"y": 1060,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "e8abe66.6a0aa18",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "pause every 6",
"props": [
{
"p": "payload",
"v": "{\"command\": \"pause\", \"name\":\"every 6\"}",
"vt": "json"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\": \"pause\", \"name\":\"every 6\"}",
"payloadType": "json",
"x": 910,
"y": 1100,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "9e8a3202.ae3d9",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "add every 8",
"props": [
{
"p": "payload",
"v": "{\"command\":\"add\",\"name\":\"every 8\",\"expression\":\"*/8 * * * * * *\",\"payload\":\"hi every 8\",\"type\":\"str\"}",
"vt": "json"
},
{
"p": "topic",
"v": "_ignore_",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "_ignore_",
"payload": "{\"command\":\"add\",\"name\":\"every 8\",\"expression\":\"*/8 * * * * * *\",\"payload\":\"hi every 8\",\"type\":\"str\"}",
"payloadType": "json",
"x": 910,
"y": 840,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "276fbb6f.b78e94",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "remove every 8",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "remove",
"payload": "every 8",
"payloadType": "str",
"x": 920,
"y": 880,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "540f9bdc.808cf4",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "start every 6",
"props": [
{
"p": "payload",
"v": "every 6",
"vt": "str"
},
{
"p": "topic",
"v": "start",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "start",
"payload": "every 6",
"payloadType": "str",
"x": 910,
"y": 1140,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "f7509f08.69bb9",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "remove-all-dynamic",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "remove-all-dynamic",
"payload": "",
"payloadType": "date",
"x": 930,
"y": 1240,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "e057de86.30bfa",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "pause-all",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\": \"pause-all\"}",
"payloadType": "json",
"x": 900,
"y": 1300,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "b247f14a.cf2f",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "start-all",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "start-all",
"payload": "",
"payloadType": "date",
"x": 890,
"y": 1460,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "6ea9b27a.04bf6c",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "stop-all",
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "stop-all",
"payload": "{\"command\": \"stop-all\"}",
"payloadType": "json",
"x": 900,
"y": 1340,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "4a1dc32e.9dbf1c",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "add 3 schedules",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "add",
"payload": "[{\"command\":\"add\",\"name\":\"every 5 mins on monday\",\"expression\":\"0 */5 * * * MON *\",\"payload\":\"hi every 5 - it must be monday\",\"type\":\"str\",\"limit\":3},{\"command\":\"add\",\"name\":\"every 10 mins on tuesday\",\"expression\":\"0 */10 * * * TUE *\",\"payload\":\"It must be tuesday\",\"type\":\"str\",\"limit\":3},{\"command\":\"add\",\"name\":\"every 20s Wed~Sun\",\"expression\":\"*/20 * * * * 3-7 *\",\"payload\":\"Hi wed~sun\",\"type\":\"default\",\"limit\":3}]",
"payloadType": "json",
"x": 920,
"y": 1200,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "6dde0693.66ed08",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "describe array of expressions",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[{\"command\":\"describe\",\"expression\":\"0 0 2 29 FEB * 2020-2040\"},{\"command\":\"describe\",\"expression\":\"4 */7 * * * 1-4 *\"},{\"command\":\"describe\",\"expression\":\"0/20 * * * * MON *\"}]",
"payloadType": "json",
"x": 1240,
"y": 880,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "27e00c01.1fd474",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Get status of \"every 8\"",
"props": [
{
"p": "payload",
"v": "every 8",
"vt": "str"
},
{
"p": "topic",
"v": "status",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "status",
"payload": "every 8",
"payloadType": "str",
"x": 940,
"y": 920,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "221cb0d1.2321f",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "export all dynamic schedules",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\":\"export-all-dynamic\"}",
"payloadType": "json",
"x": 960,
"y": 1580,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "482be49c.66898c",
"type": "comment",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Fully dynamic example demonstrating many functions of CRON-PLUS - see built in help for more info",
"info": "",
"x": 1160,
"y": 800,
"wires": []
},
{
"id": "3c39c8ac.e11a08",
"type": "cronplus",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Tokyo 8am & 4:30pm, Mon ~ Fri",
"outputField": "payload",
"timeZone": "Asia/Tokyo",
"persistDynamic": false,
"storeName": "",
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "Start-of-shift",
"payloadType": "str",
"payload": "Start work now Tokyo",
"expressionType": "cron",
"expression": "0 0 8 * * 1-5",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
},
{
"name": "schedule2",
"topic": "End-of-shift",
"payloadType": "str",
"payload": "Go home Tokyo",
"expressionType": "cron",
"expression": "0 30 16 * * 1-5",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 1330,
"y": 1380,
"wires": [
[
"7945501b.3547"
]
]
},
{
"id": "7945501b.3547",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"x": 1530,
"y": 1380,
"wires": []
},
{
"id": "7ad3fa7f.e3acd4",
"type": "cronplus",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Simple every hour Mon ~ Fri",
"outputField": "payload",
"timeZone": "",
"storeName": "",
"commandResponseMsgOutput": "output1",
"defaultLocation": "",
"defaultLocationType": "default",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "hourly",
"payloadType": "str",
"payload": "Every hour, mon-fri",
"expressionType": "cron",
"expression": "0 0 * * * MON-FRI",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 1320,
"y": 1280,
"wires": [
[
"5f323eb9.e9f7d"
]
]
},
{
"id": "5f323eb9.e9f7d",
"type": "debug",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1550,
"y": 1280,
"wires": []
},
{
"id": "48b74cdb.647ea4",
"type": "comment",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Demonstrating 2 schedules & timezone",
"info": "",
"x": 1350,
"y": 1340,
"wires": []
},
{
"id": "94553308.0c403",
"type": "comment",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "Simple example. Only 1 UI entry so inject button appears",
"info": "",
"x": 1410,
"y": 1240,
"wires": []
},
{
"id": "2db145e3.78f78a",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "stop-all-dynamic",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "stop-all-dynamic",
"payload": "",
"payloadType": "date",
"x": 920,
"y": 1380,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "9ac1b61.86b6d48",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "stop-all-static",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "stop-all-static",
"payload": "",
"payloadType": "date",
"x": 910,
"y": 1420,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "81b4094b.d0d778",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "start-all-dynamic",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "start-all-dynamic",
"payload": "",
"payloadType": "date",
"x": 920,
"y": 1500,
"wires": [
[
"65892a57.612d44"
]
]
},
{
"id": "b3512276.df97c",
"type": "inject",
"z": "d49b385d8b582b20",
"g": "ac8b0a46f1caa685",
"name": "start-all-static",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "start-all-static",
"payload": "",
"payloadType": "date",
"x": 910,
"y": 1540,
"wires": [
[
"65892a57.612d44"
]
]
}
]