Cronjob Setting+ Zend Framework

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rithin
Forum Newbie
Posts: 1
Joined: Tue Sep 15, 2009 6:48 am

Cronjob Setting+ Zend Framework

Post by rithin »

Please tell anybody knows to set cronjob in a zendframework application.
I have a controller named CronController.php. this have to run in a date. how it will set as cronjob.

i created a new cronjob in capanel and given the path like this
/home/spotlunc/public_html/zf_reubro/spotlunch/application/controllers/CronController.php:

but i got the status message of crontab as like this
/home/spotlunc/public_html/zf_reubro/spotlunch/application/controllers/CronController.php: Unsupported scheme.

Please help me if anybody knows.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Cronjob Setting+ Zend Framework

Post by Eran »

The controller expects an HTTP request, which you are not generating (it is a local file access instead). Since you can't point a cron job at a URL, only at an actual file - create a php script that includes your environment settings (bootstrap) and then run whatever logic it needs from within the framework.
Post Reply