简体   繁体   中英

date scheduled functions in mySQL?

I have a few date scheduled functions in my php functions. Ie do this and that if date is 1st of month. Often should be sent out emails via phpMailer.

Till now I check on every user login if the procedure was made already (I store the timestamp when the procedure was made). But in my opinion this is not very professional.

Is there a way to let do this mySQL? It's not only SQL code. There is also PHP and I must have access to the phpMailer function.

Thanks for your help! Markus

Depending on your server environment, I would set up a scheduled task on the server to handle the periodic execution of scripts.

For Linux environments, a crontab task is well suited for this.

On windows-based servers the Task Scheduler preforms a similar function.

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