[kdepim-users] How to restart akonadi from cron?

Kevin Krammer krammer at kde.org
Fri Nov 15 10:34:23 GMT 2013


Thomas,

On Thursday, 2013-11-14, 17:37:39, ITSEF Admin wrote:
> Kevin,
> 
> On Thursday 14 November 2013 15:50:32 Kevin Krammer wrote:
> > One idea I had: what if you only use the cron task as a trigger source but
> > execute the restart inside the user session?
> 
> [...]
> 
> > I assume suitable blocking wait could be done with inotifywait, e.g.
> > waiting for a file to be created and then either waiting for another file
> > or waiting for the removal.
> > 
> > The cronjob would create/delete those "trigger indicator" files.
> 
> [...]
> 
> That got me on the right track, thanks! I just created such a script and two
> trigger entries in cron. It's quite rough on the edges but sufficient to
> test whether this awful kludge can at least prevent akonadi from shitting
> itself when the IMAP server goes down at night. If that works, I'll make it
> a bit "nicer" so Kontact/akonadi at least stays usable.
> 
> Of course, the only *real* solution for this problem is to make akonadi (or
> at least the parts that deal with IMAP) more robust... I'll keep my fingers
> crossed that the developers can pull this off soon, as this is a
> deal-breaker for us... :-(

Of course!
Btw, if you only need to toggle imap resources to "online" again, then you can 
probably do that without restarting Akonadi.
That online/offline switching can be triggered through D-Bus directly on the 
resources themselves.

Some calls to qdbus, grepping for the IMAP resources and qdbus calls again 
might also do the trick.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20131115/c62b287e/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
Subscription management: https://mail.kde.org/mailman/listinfo/kdepim-users


More information about the kdepim-users mailing list