You are not logged in.
Pages: 1
I want to create a cronjob speficially for my user to run offlineimap, so that it is run by my user.
I do not understand, however, how to do that... When I run crontab -e as my user I am getting redirected to some file in /tmp/ ...
EDIT: Exactly what was needed... Now it is working, it seems.
If I get errors with the command I am running, where are they printed to? to /var/log/crond?
Also.... I don't have the feeling the command is actually executed; I don't see mails popping up in my account.
EDIT: Everything works nicely...
Last edited by Stalafin (2009-02-03 22:45:34)
Offline
Maybe a little topic highjacking but i wondered where these crontab are saved, I'm just curious
//edit I found it. /var/spool/cron
Last edited by Vintendo (2009-02-03 19:10:00)
Offline
So this is [SOLVED]...?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
i'm confused by this thread.. anyways... as think it's applicable, i use fcron + a script to keep offlineimap running (as it tends to quit sporadically)
> sudo fcrontab -u patrick -e
!mail(no),nolog(yes)
*/5 * * * * /home/patrick/Scripts/mailup
and the mailup script:
#!/bin/bash
if [ $(ps -A | grep offlineimap | wc -l) -eq 0 ] ; then
offlineimap &
exit 0
else
exit 0
fi
and please, do mark as solved
edit: fcron errors out to /var/log/{crond.log,errors.log,everything.log}
Last edited by brisbin33 (2009-02-03 22:36:56)
//github/
Offline
Vintendo: Thanks for the hijack, I wondered about that as well.
fukawi2: Yeah, sorry; this is solved.
brisbin33: I don't understand, what is the advantage of fcron over cron?
Also, I don't keep offlineimap running, as that is not needed. In ~/.offlineimaprc, I have autorefresh deactivated. So what that leaves me with, is cron invoking offlineimap, which runs, synchronizes my mailboxes, and then quits.
I think this makes more sense than your solution. You basically have offlineimap running and check every few minutes if it is still running, right?
Last edited by Stalafin (2009-02-03 22:53:01)
Offline
Vintendo: Thanks for the hijack, I wondered about that as well.
fukawi2: Yeah, sorry; this is solved.
brisbin33: I don't understand, what is the advantage of fcron over cron?
Also, I don't keep offlineimap running, as that is not needed. In ~/.offlineimaprc, I have autorefresh deactivated. So what that leaves me with, is cron invoking offlineimap, which runs, synchronizes my mailboxes, and then quits.
I think this makes more sense than your solution. You basically have offlineimap running and check every few minutes if it is still running, right?
fcron has many advantages over cron, you can check their site.
i want offlineimap running all the time and quick-syncing often so i get emails... um, when i get them. offlineimap has a tendency to quit for no reason so i have that cronjob script that runs every five minutes, but - if offlineimap's already running it immediately exits w/o errors or consuming any extra resources. seemed like the appropriate method to me.
oh well, glad you found a solution that works for you.
cheers,
pat
//github/
Offline
Pages: 1