简体   繁体   English

如何在 Java 中实现日历事件驱动的工作流

[英]How to implement a calendar event-driven workflow in Java

The project I work in requires me to write a service in Java that acts as a calendar.我工作的项目要求我在 Java 中编写一个服务,充当日历。 It should be possible to put events on the calendar, at a specific point in time.应该可以在特定时间点将事件放在日历上。

And there should be a process that checks if the time has come to execute the event.并且应该有一个过程来检查是否到了执行事件的时间。

I am thinking of using a database that has a table of events, by timestamp.我正在考虑使用具有事件表的数据库,按时间戳。 One process puts the events in the database (or updates existing events, which must be possible), and then the other process periodically checks if it is time to execute the event.一个进程将事件放入数据库(或更新现有事件,这必须是可能的),然后另一个进程定期检查是否到了执行事件的时间。

However, I wonder if API's or frameworks already exist to achieve this?但是,我想知道 API 或框架是否已经存在来实现这一点?

I am using Spring in our projects.我在我们的项目中使用 Spring。

Very quickly after posting the question, I have found Spring Quartz API.发布问题后很快,我发现了 Spring Quartz API。 This may be what I was looking for.这可能是我一直在寻找的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM