Re: Keeping offlineimap running indefinately
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi Daniel,
It sure seems odd that cron can't restart it, but I'm not really cron
user so I can't comment. offlineimap frequently crashes on me, though,
so I wrote a fancy bash script to restart it. It essentially does this:
while ! offlineimap; do sleep 1; done
I'm hard-pressed to remember whether I've had trouble with this method
with network timeouts (which have occurred) or other issues. At any
rate, I've been using this script for over a year, and the vast
majority of the time it just works, sometimes restarting offlineimap
dozens of times per day due to crashes.
Of course I am still using offlineimap 5.99.4, and I'm not sure if
recent changes would prevent this from working; but there is definitely
a lock file in my metadata folder that prevents a second instance from
starting.
Good luck, (maybe someone with more knowledge will step in :)
David.
On Saturday 27 September 2008 1:28 am, Daniel Skinner wrote:
> Hi,
>
> I have been using offlineimap for a while now to sync two IMAP boxes -
> it's a fantastic tool.
>
> I am looking to keep these mailboxes permanently and frequently
> sync'd.
>
> I have tried cron but if offlineimap aborts from some reason (I am not
> sure why it does, I think it might be a network timeout), the lock
> file will prevent cron from restarting the process.
>
> What is the best way to get offlineimap running permanently and to
> automatically get it back on its feet if any type of exception occurs?
> --
>
> Kind Regards,
>
> *Daniel Skinner*
>
|
|