Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

cron - Python OpenWRT crontab -


im trying run python script on openwrt box:

#!/root/system/usr/bin/python import subprocess  p = subprocess.popen([r"snmpget","-v","1","-c","public","-oqv","-ln", "192.168.1.1","1.3.6.1.2.1.2.2.1.10.7"], stdout=subprocess.pipe).communicate()[0] data = [r"curl","-d","iface_id=1&content="+ str(p).rstrip() ,"http://192.168.1.5:8080/stat/add_istat/"] = subprocess.popen(data, stdout=subprocess.pipe).communicate()[0] 

it's geting data on snmp, post data curl local server. working ok shell:

root@openwrt:~/python# ./w.py    % total    % received % xferd  average speed   time    time     time  current                                  dload  upload   total   spent    left  speed   0    34    0     6    0    28     31    146 --:--:-- --:--:-- --:--:--     0 

i can see data in db. cron:

0-55/5 * * * * /root/python/w.py 

i see in logread:

dec 20 23:30:01 openwrt cron.err crond[1039]: user root pid 16141 cmd /root/python/w.py 

but no data in db :( , nothing in httpd access.log :( why?

could snmpget or curl not in path of cron?


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -