Merge branch 'feature/mzl_dev'
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace app\process;
|
||||
|
||||
use app\crm\model\Customer;
|
||||
use support\Log;
|
||||
use Workerman\Crontab\Crontab;
|
||||
use app\common\utils\email\Emails as EmailsUtils;
|
||||
|
||||
class Emails
|
||||
{
|
||||
|
||||
public function onWorkerStart()
|
||||
{
|
||||
// 拉取新邮件
|
||||
new Crontab('0 */30 * * * *', function(){
|
||||
$email = new EmailsUtils();
|
||||
$email->uids();
|
||||
});
|
||||
|
||||
// 邮件详情
|
||||
new Crontab('0 */35 * * * *', function(){
|
||||
$email = new EmailsUtils();
|
||||
$email->details();
|
||||
});
|
||||
|
||||
// 邮件处理
|
||||
new Crontab('0 */40 * * * *', function(){
|
||||
$email = new EmailsUtils();
|
||||
$email->process();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user