每天在特定时间检查数据库并发送通知

发布于 2025-02-06 18:37:51 字数 395 浏览 1 评论 0原文

对于以下问题,我找不到正确的解决方案。有一个数据库SQLITE,其中包含员工名称和出生日期的列表。每天都有必要在特定时间(例如,8:00)在后台检查数据库,如果员工有生日,请发送带有其名称的通知。我会感谢任何建议。

// Checking the database before triggering a notification
func checkDataBase() -> (Bool, String) {
    var showNotification: Bool = false
    var employeeName: String = ""
    
    // Database checking
    
    return (showNotification, employeeName)
}

I can't find the right solution for the following problem. There is a database SQLite with a list of names of employees and dates of birth. It is necessary every day at a certain time (for example, at 8:00) to check the database in the background and, if the employee has a birthday, send a notification with his name. I would be grateful for any advice.

// Checking the database before triggering a notification
func checkDataBase() -> (Bool, String) {
    var showNotification: Bool = false
    var employeeName: String = ""
    
    // Database checking
    
    return (showNotification, employeeName)
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文