简体   繁体   English

我如何在 CakePHP 中使用 Cron?

[英]How can I use Cron in CakePHP?

How can I use a cron job file in CakePHP for sending GCM messages in particular interval?如何在CakePHP 中使用cron 作业文件以特定时间间隔发送 GCM 消息?

Can you suggest any tutorials for this?你能为此推荐任何教程吗?

I would like to send GCM messages to an Android phone in fixed intervals.我想以固定的时间间隔向 Android 手机发送 GCM 消息。

Sounds like a job for a custom data source or maybe transport adapter for the CakeEmail class, I haven't looked much at the GCM spec (your job).听起来像是自定义数据源的工作,或者是 CakeEmail 类的传输适配器,但我对 GCM 规范(您的工作)的了解不多。 Use a cake shell to send the messags in an interval.使用蛋糕壳在一个时间间隔内发送消息。

You can find the all the info about custom datasources, mail transports and shells (including cron jobs) here:您可以在此处找到有关自定义数据源、邮件传输和 shell(包括 cron 作业)的所有信息:

The last link contains the info how to set up a cron job with cakephp shells.最后一个链接包含如何使用 cakephp shell 设置 cron 作业的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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