2

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?

Charles
  • 50,943
  • 13
  • 104
  • 142
Andy Baird
  • 6,088
  • 4
  • 43
  • 63

2 Answers2

5

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.

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.

Noah Goodrich
  • 24,875
  • 14
  • 66
  • 96
  • How do you secure your cron scripts from being run by just anyone? – rg88 Feb 27 '11 at 17:02
  • I'd also like to know how they are secured – Anagio Oct 21 '11 at 19:58
  • They are secured as they are not directly accessible from the web. Those familiar with the ZF MVC pattern will be able to tell you that these are not exposed through the Front Controller and thus cannot be reached by anyone other than local administrators. – Erik Oct 21 '11 at 22:39
2

I had to create a script that would be run via cron (and I was not using modules) so I stuck mine in something like library/Myproject/cronscripts

Here is a pertinent article.

rg88
  • 20,742
  • 18
  • 76
  • 110