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.

linux - Cron Terminates Python Script? -


i have 'long' python script takes 45[min] run. use (a 'scheduler' script) python script run long script. when run 'scheduler' script using terminal, works (meaning, 'long' script runs without issues).

i had struggles, succeeded adding 'scheduler' script run through cron every minute. 'runs' other script , works ok.

here problem: whenever script (that being 'run' 'scheduler') has line says:

print "hello" 

or 'print' statement, cron job runs, terminates after 20-30 seconds. when remove 'print' statements, cron runs jobs , not terminate.

i'd fix situation, , have scripts continue run if have 'print' statements in them. hints how it?

p.s. within 'scheduler', use

subprocess.popen([sys.executable, command]) 

to 'run' other python scripts.

i have hunch it's due way cron handles stdout. how redirecting output?

from http://aplawrence.com/bdd/bbcronbasics.html:

output

normally output of program sent stdout (standard out) , winds on someone's display screen. jobs started cron, stdout directed local mail subsystem, means output generated cron job mailed user owning job. if not desirable should take steps redirect cron job's output file. suggested redirect stderr (standard error) file able analyze anomalies in cron job's execution.


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 -