<div dir="ltr">Hi,<div>It's better to specify version of python you work with. I know nothing about python 3 but in python 2 you can do this with `exec`. Example:</div><div><br></div><div>> f = file('otherFile.py')</div>



<div>> exec f</div><div class="gmail_extra"><br></div><div class="gmail_extra">For more, read the doc: 
<a href="http://docs.python.org/2.7/reference/simple_stmts.html#the-exec-statement" target="_blank">http://docs.python.org/2.7/reference/simple_stmts.html#the-exec-statement</a> </div><div class="gmail_extra">HTH</div><div class="gmail_extra">



<br></div><div class="gmail_extra">                                                                                                                               Kevin</div><div class="gmail_extra"><br><div class="gmail_quote">


2013/5/18 Avnesh Shakya <span dir="ltr"><<a href="mailto:avnesh.nitk@gmail.com" target="_blank">avnesh.nitk@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">hi,<br>
   I want to run a another file inside a ached.add_cron_job(..). how is it possible, please help me, I have a file otherFile.py for execution inside current file.<br>
I know it is very easy question but i m unable to get anything, please help me.<br>
example --<br>
<br>
import otherFile<br>
from apscheduler.scheduler import Scheduler<br>
sched = Scheduler()<br>
sched.start()<br>
<br>
def job_function():<br>
    # Can I here add that file for execution, Or can i add that file directly inside cron?<br>
<br>
sched.add_cron_job(job_function, month='1-12', day='1-31', hour='0-23',minute='44-49')<br>
<span><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>让我们忠于理想,让我们面对现实。
</div></div>