Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
2,167
Widok
0
27/08/2015 10:15 pm
Topic starter
php/kohana - auto script execute every X time
1 Answer
0
27/08/2015 10:18 pm
Topic starter
1. enable minion module inside bootstrap.php ( http://muszak.eu/answers/phpkohana-please-enable-the-minion-module-for-cli-support/ )
2. follow instructions https://kohanaframework.org/3.3/guide/minion/tasks
Create demo.php file inside application/classes/Task/Demo.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
'bar', 'bar' => NULL, ); /** * This is a demo task * * @return null */ protected function _execute(array $params) { var_dump($params); echo 'foobar'; Request::factory('MyController/DoSomething')->execute(); } } |
'bar', 'bar' => NULL, ); /** * This is a demo task * * @return null */ protected function _execute(array $params) { var_dump($params); echo 'foobar'; Request::factory('MyController/DoSomething')->execute(); } }
3. (WIN) Open taskschd.msc and addo script:
1 |
php.exe index.php --task=Demo
|
php.exe index.php --task=Demo