如何在 EC2 上将 @Scheduled 设置为 运行
How to get @Scheduled to run on EC2
我已经使用 Beanstalk 成功部署了我的 spring 启动应用程序,但我注意到它没有 运行ing 我拥有的 @Scheduled 事件。
@Scheduled(cron = "0 30 * * * *")
public void getProperStudiesInTable() {
//some code to execute
}
我在 64 位亚马逊 Linux 2/3.0.1 上的 Corretto 11 运行ning 上部署了 jar 文件作为实例。非常感谢任何关于如何将其发送到 运行 的建议!
我能够弄清楚我的问题。我需要通过 ssh 进入实例并通过 运行
启动实际服务器
java -jar application.jar
我已经使用 Beanstalk 成功部署了我的 spring 启动应用程序,但我注意到它没有 运行ing 我拥有的 @Scheduled 事件。
@Scheduled(cron = "0 30 * * * *")
public void getProperStudiesInTable() {
//some code to execute
}
我在 64 位亚马逊 Linux 2/3.0.1 上的 Corretto 11 运行ning 上部署了 jar 文件作为实例。非常感谢任何关于如何将其发送到 运行 的建议!
我能够弄清楚我的问题。我需要通过 ssh 进入实例并通过 运行
启动实际服务器java -jar application.jar