i have seen instructions on running cron in advanced template, cant figure out how on basic template. have following controller in basic controllers folder. <?php namespace app\controllers; use yii\console\controller; /** * cron controller */ class croncontroller extends controller { public function actionindex() { echo "cron service runnning"; } public function actionmail($to) { echo "sending mail " . $to; } } i have navigated root of application , tried these comands yii cron php yii cron im getting unknown comand "cron" i know old question failed find actual answer this. if @ code yii exec file you'll notice requires /common/config/aliases.php file console/config/main.php. can naturally change these or copy on these advanced template. hope solves problem wanting same thing.
i trying simple addition function take number x array , add variable i it, iteration variable inside loop. instead of adding each variable individually , producing output of : 3, 2, 7 it produces values of 3, 5, 13. #include <stdio.h> int add(int x[], int y); int main(void) { int i; int a[3] = {3, 1, 5}; for(i=0; i<3; i++) { printf("%d \t", i); printf("%d, %d, equals %d \n", a[i], i, add(a[i], i)); } return 0; } int add(int x[], int y){ return x+y; } try int add(int x, int y){ return x+y; }
i have file stored in project directory. make few changes , save using filechooser saved dialog box. after saving want file automatically opened in system. succeeded in saving file not getting how open automatically without user choosing open dialog box. code saving file written below. string input = ""; try { outputstream outstream = null; ipfile = thread.currentthread().getcontextclassloader().getresourceasstream("upgradeworkbench/resources/ip_template.sh"); stage stage = new stage(); stage.settitle("save"); byte[] buffer = null; buffer = new byte[ipfile.available()]; ipfile.read(buffer); filechooser filechooser = new filechooser(); filechooser.setinitialfilename("ip_template"); filechooser.getextensionfilters().addall( new filechooser.extensio...
Comments
Post a Comment