On Wed, Dec 10, 2008 at 11:29:10AM -0800, Steve Willoughby wrote:
> On Wed, Dec 10, 2008 at 01:15:18PM -0600, shawn bright wrote:
> > i am running this on a linux computer. How would i check that it is
> > running? (from cron part)
>
> Typically you have your program write its PID to a file. The
cool thanks for the help.
-shawn
On Wed, Dec 10, 2008 at 1:29 PM, Steve Willoughby <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 10, 2008 at 01:15:18PM -0600, shawn bright wrote:
>> Sorry, was not very specific in my request.
>>
>> say i have a script like
>>
>> while 1:
>> do_something_cool()
>>
On Wed, Dec 10, 2008 at 01:15:18PM -0600, shawn bright wrote:
> Sorry, was not very specific in my request.
>
> say i have a script like
>
> while 1:
> do_something_cool()
> time.sleep(2)
Ah, ok. First of all, my preference would be to say "while True:"
there, seems more clear to me. A
Sorry, was not very specific in my request.
say i have a script like
while 1:
do_something_cool()
time.sleep(2)
i am running this on a linux computer. How would i check that it is
running? (from cron part)
and how do i kick it off when i boot the computer? ( the init script part)
thanks
while True:
is also a common way to make your program "run forever". Although you still
need to create some sleep/wait function or it will eat up your available
processes (so I'm told).
-HTH,
Wayne
On Wed, Dec 10, 2008 at 12:28 PM, Steve Willoughby <[EMAIL PROTECTED]>wrote:
> On Wed, Dec 10, 200
On Wed, Dec 10, 2008 at 12:23:48PM -0600, shawn bright wrote:
> Hey gents,
>
> I have an interesting problem. I need to have a python script start
> when a computer boots up, and i need it to run forever.
> I also am going to run a script by cron that will check to see if the
> process is running,
Hey gents,
I have an interesting problem. I need to have a python script start
when a computer boots up, and i need it to run forever.
I also am going to run a script by cron that will check to see if the
process is running, if not, i need a python script to execute
the script.
What would be a go