开发者

file path for a Cron job script in a zendframework project

开发者 https://www.devze.com 2023-02-14 15:08 出处:网络
I have a zendframework project. I need to create a cronjob from the C开发者_StackOverflowpanel. But I have one doubt. Where I put the cronjob script file (in public_html? or anywhere in the project as

I have a zendframework project. I need to create a cronjob from the C开发者_StackOverflowpanel. But I have one doubt. Where I put the cronjob script file (in public_html? or anywhere in the project as in the usual manner). Then what is the path i have to give in the Command textbox in Cpanel

Please reply anyone. I am still waiting .... Please ...

Thanks


You can really put it wherever you like.

I typically create a directory in my project root called "cli/", and put stuff in there.

Usually I'll have a little boot.php script that looks a lot like my app's index.php, but ends with $application->bootstrap(); instead of $application->bootstrap()->run();

As for your cron job, you can do something like:

* * * * * ENVIRONMENT=production /usr/bin/php /path/to/your/project/cli/script.php
0

精彩评论

暂无评论...
验证码 换一张
取 消