PHP: Send Email via cronjob and set amount of email send per mins

后端 未结 3 530
忘了有多久
忘了有多久 2021-01-26 11:12

i have a program which use to send group emails, i set a cornjob per mins for this program, and set execute per 2nd/min, and check if the now time is match to my defined schedu

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-26 11:57

    I think you should set this configuration at the application level rather than the cron job level.

    Let's say, cron job should run every minute but the application itself should know howmany e-mails to send when a cron job runs by checking the datetime for the last e-mail is sent, and let's say, send 3 more e-mails and so.

提交回复
热议问题