You are not logged in.

#1 2013-03-20 01:27:04

fawkes5
Member
From: Canada
Registered: 2012-12-23
Posts: 84

Cron vs other methods to automate email sync

Hello,

I would like to automate the process of email sync using
mbsync. Manually i run

 mbsync gmail-inbox 

I heard cron can do this, but cron makes me nervous. To me
its a base component of arch. The arch wiki says its
"commonly used for system maintenance and administration"
task. That sounds like its for more 'essential' tasks then
just syncing email.

Also, checking email can be a noisy process, that makes me nervous
as well.

So what is the preferred method for what i want to do. Cron,
some sore of loop [thats all i got]...?

Thank you!

Offline

#2 2013-03-20 01:33:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Cron vs other methods to automate email sync

Cron has a crontab for the root user as well as normal users.  If you do "crontab -e" it will be your crontab.  If you do "sudo crontab -e" it will be the root user's

I use it to sync offlineimap for myself, as using offlineimap as a service seems to have way too much overhead.  Though I have been thinking about looking into setting it to sync only my inbox and spam frequently and do a mass sync of all of it once a day... maybe that will help it out when it has three accounts to sync... that's my issue though.  Back to yours.

So yes, this is fine.  But you may want to put a few lines of script into place to make sure that there doesn't exist any hung or dead processes of syncing and kill those before it runs the sync. 

BTW, what is mbsync? Nevermind, found it.

Last edited by WonderWoofy (2013-03-20 01:33:42)

Offline

#3 2013-03-20 01:39:26

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,357
Website

Re: Cron vs other methods to automate email sync

man cron wrote:

crond - daemon to execute scheduled commands

Sounds perfectly apt to use this for synching email (like WonderWoofy, that's what I use).


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

Board footer

Powered by FluxBB