Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望在启动服务器时自动启动服务。我希望这项服务在周一、周三和周五早上 8 点向数据库中的所有客户发送电子邮件。
谁能帮我?谢谢
如果您付出了一些努力,那就太好了,但是,本着帮助的精神,这是您解决此问题的方法:
然后在 Bootstrap.groovy 中初始化你的工作(更多关于 cron 表达式在这里):
NotificationSenderJob.schedule('0 0 8 ? * MON-FRI', null)
你应该准备好了。