With the task scheduling feature, any DSL script, Flows can be scheduled to run at a time that is most convenient for you. The task scheduler starts and runs in the background every time the system starts. When we need to execute some repetitive events on the server regularly, we can run the prepared DSL script through the task scheduler to run at a specific time.
/schedules/test.sch.json
, the writing method of the scheduled task is the same as the Linux crontab, the code:{"name": "Called every minute","schedule": "*/1 * * * *","process": "scripts.schedules.Send","args": []}
scripts/schedules.js
code:function Send() {console.log("Enter the scheduled task!");}
Execute yao start
and wait for 1 minute to see the print information
With the task scheduling feature, any DSL script, Flows can be scheduled to run at a time that is most convenient for you. The task scheduler starts and runs in the background every time the system starts. When we need to execute some repetitive events on the server regularly, we can run the prepared DSL script through the task scheduler to run at a specific time.
/schedules/test.sch.json
, the writing method of the scheduled task is the same as the Linux crontab, the code:{"name": "Called every minute","schedule": "*/1 * * * *","process": "scripts.schedules.Send","args": []}
scripts/schedules.js
code:function Send() {console.log("Enter the scheduled task!");}
Execute yao start
and wait for 1 minute to see the print information