[ { "id": "flow-repeatable-jobs", "type": "tab", "label": "BullMQ repeatable jobs", "disabled": false, "info": "Dedicated repeatable job command examples for BullMQ Job Scheduler compatibility commands." }, { "id": "queue-repeatable-jobs", "type": "bull-queue-server", "name": "basecasts", "deployment": "single", "address": "localhost", "port": "6379", "db": "", "clusterNodes": "", "sentinels": "", "sentinelMasterName": "", "username": "", "sentinelUsername": "", "tls": false, "sentinelTls": false, "tlsRejectUnauthorized": true, "tlsServerName": "", "prefix": "" }, { "id": "inject-repeat-add", "type": "inject", "z": "flow-repeatable-jobs", "name": "repeat: add basecasts job", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "gateway-FCC23DFFFE0AA2A8", "payloadType": "str", "x": 180, "y": 100, "wires": [["fn-repeat-add"]] }, { "id": "fn-repeat-add", "type": "function", "z": "flow-repeatable-jobs", "name": "add repeat cron", "func": "msg.cmd = \"add\";\nmsg.jobopts = {\"jobId\": msg.payload, \"repeat\": {\"cron\": \"30 9,19,29,39,49,59 * * * *\"}};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 430, "y": 100, "wires": [["cmd-repeatable-jobs"]] }, { "id": "inject-repeat-get-all", "type": "inject", "z": "flow-repeatable-jobs", "name": "repeat: getRepeatableJobs", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "str", "x": 190, "y": 180, "wires": [["fn-repeat-get-all"]] }, { "id": "fn-repeat-get-all", "type": "function", "z": "flow-repeatable-jobs", "name": "getRepeatableJobs", "func": "msg.cmd = \"getRepeatableJobs\";\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 440, "y": 180, "wires": [["cmd-repeatable-jobs"]] }, { "id": "inject-repeat-count", "type": "inject", "z": "flow-repeatable-jobs", "name": "repeat: count", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "str", "x": 150, "y": 260, "wires": [["fn-repeat-count"]] }, { "id": "fn-repeat-count", "type": "function", "z": "flow-repeatable-jobs", "name": "count", "func": "msg.cmd = \"count\";\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 410, "y": 260, "wires": [["cmd-repeatable-jobs"]] }, { "id": "inject-repeat-get-by-key", "type": "inject", "z": "flow-repeatable-jobs", "name": "repeat: getRepeatableJobByKey", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "gateway-FCC23DFFFE0AA2A8", "payloadType": "str", "x": 220, "y": 340, "wires": [["fn-repeat-get-by-key"]] }, { "id": "fn-repeat-get-by-key", "type": "function", "z": "flow-repeatable-jobs", "name": "getRepeatableJobByKey", "func": "msg.cmd = \"getRepeatableJobByKey\";\nmsg.jobid = msg.payload;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 470, "y": 340, "wires": [["cmd-repeatable-jobs"]] }, { "id": "inject-repeat-remove-by-key", "type": "inject", "z": "flow-repeatable-jobs", "name": "repeat: removeRepeatableByKey", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "gateway-FCC23DFFFE0AA2A8", "payloadType": "str", "x": 230, "y": 420, "wires": [["fn-repeat-remove-by-key"]] }, { "id": "fn-repeat-remove-by-key", "type": "function", "z": "flow-repeatable-jobs", "name": "removeRepeatableByKey", "func": "msg.cmd = \"removeRepeatableByKey\";\nmsg.jobid = msg.payload;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 480, "y": 420, "wires": [["cmd-repeatable-jobs"]] }, { "id": "inject-repeat-stop-all", "type": "inject", "z": "flow-repeatable-jobs", "name": "repeat: stopAndRemoveAllJobs", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "str", "x": 210, "y": 500, "wires": [["fn-repeat-stop-all"]] }, { "id": "fn-repeat-stop-all", "type": "function", "z": "flow-repeatable-jobs", "name": "stopAndRemoveAllJobs", "func": "msg.cmd = \"stopAndRemoveAllJobs\";\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 470, "y": 500, "wires": [["cmd-repeatable-jobs"]] }, { "id": "cmd-repeatable-jobs", "type": "bull cmd", "z": "flow-repeatable-jobs", "name": "run repeat command", "queue": "queue-repeatable-jobs", "x": 740, "y": 260, "wires": [["debug-repeatable-jobs"]] }, { "id": "debug-repeatable-jobs", "type": "debug", "z": "flow-repeatable-jobs", "name": "repeat command output", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "x": 1000, "y": 260, "wires": [] } ]