您如何在 Zend Framework 中存储 cron 作业的脚本? [英] How do you store your scripts for cron jobs in Zend Framework?

查看:23
本文介绍了您如何在 Zend Framework 中存储 cron 作业的脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为 ZF 的所有 URL 都依赖于 mod 重写,所以我不太清楚应该在哪里存储本地脚本以用于 cron 作业.

Because ZF depends on mod rewrite for all it's URLs, it's not immediately apparent to me where I should store local scripts for use with a cron job.

有没有人有任何建议,或者有官方接受"的方式吗?

Does anyone have any recommendations, or is there an "officially accepted" way?

推荐答案

我使用 模块化目录结构 在我的网站设计中,以便我为我网站的每个单独模块创建控制器、视图等.每个模块中都有一个脚本(或 cron)目录,用于存储该特定模块的所有 cron 脚本.

I use the Modular Directory Structure in the design of my websites so that I have controllers, views, etc created for each separate module of my websites. Included within each module I have a scripts (or a cron) directory that stores all of the cron scripts for that particular module.

我个人发现,在从 Zend Framework 和实际 Web 应用程序访问资源时,这使事情变得简单.

Personally I find that this keeps things simple when it comes to access resources from Zend Framework as well as from the actual web application.

这篇关于您如何在 Zend Framework 中存储 cron 作业的脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆