使用 Chime Scheduler 每 5 分钟执行一次
Execute in every 5 minutes with Chime Scheduler
我是顶点的新手。我的应用程序需要一个每五分钟检查一次状态的调度程序。我正在尝试使用 Chime 这是一个时间调度程序 Verticle。文档展示了如何使用这段代码监听时间事件和创建调度程序
eventBus.send<JsonObject> (
"chime",
JsonObject {
"operation" -> "create",
"name" -> "my scheduler:my timer",
"description" -> JsonObject {
"type" -> "cron",
"seconds" -> "0",
"minutes" -> "30",
"hours" -> "16",
"days of month" -> "*",
"months" -> "*",
"days of week" -> "SundayL"
}
}
);
其中*
代表任意。如何配置 eventBus
每五分钟执行一次调度程序
对于这样一个简单的触发器,您可以使用 interval 计时器:
{
"type": "interval",
"delay": "300"
};
延迟是以秒为单位的值。
我是顶点的新手。我的应用程序需要一个每五分钟检查一次状态的调度程序。我正在尝试使用 Chime 这是一个时间调度程序 Verticle。文档展示了如何使用这段代码监听时间事件和创建调度程序
eventBus.send<JsonObject> (
"chime",
JsonObject {
"operation" -> "create",
"name" -> "my scheduler:my timer",
"description" -> JsonObject {
"type" -> "cron",
"seconds" -> "0",
"minutes" -> "30",
"hours" -> "16",
"days of month" -> "*",
"months" -> "*",
"days of week" -> "SundayL"
}
}
);
其中*
代表任意。如何配置 eventBus
每五分钟执行一次调度程序
对于这样一个简单的触发器,您可以使用 interval 计时器:
{
"type": "interval",
"delay": "300"
};
延迟是以秒为单位的值。