简体   繁体   中英

sails js - check database every time

I have a schedule manager web application where the system will check every hour if current time is passing the due date that stored in database and will send an email if the current time pass the due date even if the user doesn't open the web app. Can sails js alone do something like this?

You'll probably want to schedule a cron job which executes a script at a set interval to do this for you.

You can read up on cron and decide what works best for you; in general you'll probably want to have a separate script that is executable from the command line (such as a send_emails.js which you can execute with node send_emails.js ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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