CakePHPで定期実行処理をする必要があったので、ヘテムルでcron設定をした。
英語圏のひとにも考慮して英語で記載。
--- for trying ---
1. call view via cron
-> CakePHP can't excute view files.
2. use "$_GET['url']..." and "require_once..." something like that
-> i always got "no such file".
3. CakePHP shell script
-> success!
--- about CakePHP cron ---
1. args for command line.
-> C:> [FullPath]/php.exe [FullPath]/cake.php -app [Shell's FullPath] shellName actionName
2. files path. there are two directory /app/verndors/shells/ and /vendors/shells/
-> if you need access to model(DB) --> /app/vendors/shells/[your shell scripts]
when you made "/vendors/shells/[your shell scripts]" and then use
"$uses = array('[model name]')", you will got this error "missing database connection".
because, this directory(/vendors/shells/ path) can't access to model or any core component.
3. you can always check "C:> cake" command about available shells.
and you should make sure directory.
4. somtimes, you don't need args "-app [Shell's FullPath]".
--- comment ---
1. make sure name rules on CakePHP.
2. plese don't confuse. CakePHP have many similar file and folder name.
CakePHPのドキュメント上だと、 /vendors/shells/ を例に書いてあったが、
/app/verndors/shells/ に置かないとモデルにアクセスできなかったので、
このフォルダに置いたら色々解決した。
あとは、ヘテムルのcron実行時に「-app」を指定すると available shells から名前が
消えてしまうので、「-app」なしで実行した。