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 realize question might seem trivial some, it's these types of things find myself fighting quite bit , want make sense of despite seeming losing battle in .net (for me anyway). so, if following: using system.web; ... applicationuser user = system.web.httpcontext.getowincontext().getusermanager<applicationusermanager>().findbyid(system.web.httpcontext.user.identity.getuserid()); that produces error in title , red getowincontext() , error cannot resolve symbol 'getowincontext()' however, if following (remove system.web in front of httpcontext ), works expected (or @ least no errors): using system.web; ... applicationuser user = httpcontext.getowincontext().getusermanager<applicationusermanager>().findbyid(system.web.httpcontext.user.identity.getuserid()); however, if (same line that's working using system.web commented out): //using system.web; ... applicationuser user = httpcontext.getowincontext().getusermana...
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