Daemonizing python

andychambers2002 at yahoo.co.uk andychambers2002 at yahoo.co.uk
Mon Sep 25 06:19:15 EDT 2006


Andi Clemens wrote:
> Hi,
>
> what is the main difference of running a python program as a daemon or
> as a cronjob?
>
> I have written a program at work that checks all internet connections of
> our failover sites and saves the results in a MySQL-database.
> The whole program is made with django (a webframework) so I had to be
> sure that the "checking procedure" is done every 30 minutes.

With a daemon, you might be able to flag up problems earlier than the
periodic check would allow.  On the other hand, you *know* that cron
will run every 30 minutes.  Do you *know* that your daemon will not
stop running somehow?  I suppose I put more trust in cron than I do in
myself.

Regards,
Andy




More information about the Python-list mailing list