php - Zpanel and cron job with cakephp -
i have tried , browsed lot regarding how set cron job cakephp , zpanel
in zpanel tried different types url
for illustration
domain_folder/app/cron_dispatcher.php /campaignmasters/newsletter_find_cron(error: script not exist)then tried file domain_folder/app/cronjob.php(worked)
it worked confused how can phone call "domain_folder/app/cron_dispatcher.php /campaignmasters/newsletter_find_cron" cronjob.php
i in twisted state, have tried 10 hours trying many methods.
any zpanel or cakephp expert please tell me best way set cron job.
can add together cron job through ssh in zpanel? if can add together 1 through ssh "domain_folder/app/cron_dispatcher.php /campaignmasters/newsletter_find_cron" great. ready seek anything.
the os centos
i decided go out :)
step 1
create shell class can phone call actions command line.
http://book.cakephp.org/2.0/en/console-and-shells.html
class helloshell extends appshell { public function main() { $this->out('hello world.'); } }
step 2
try command you've created via ssh or terminal:
console/cake hello
you may have run command in app directory:
cd yourapp/app ../console/cake hello
step 3
create cron job using cron tab
crontab -e
vim or default text editor open. apply cron command there.
* 00 * * 6 php your_app_path/lib/cake/console/cake.php hello
checkout http://en.wikipedia.org/wiki/cron understand how occurrences work.
save , done!
php ssh cron cakephp-2.0 izpanel
No comments:
Post a Comment