[Techtalk] cron not running?
anotheranne at fables.co.za
Mon Jan 12 20:56:45 UTC 2009
On Mon, 12 Jan 2009 00:15:17 +0100
|> Hi Anne,
|> Op maandag 12-01-2009 om 00:57 uur [tijdzone +0200], schreef Anne
|> > Hi,
|> > setting my test server up, going well
|> > postfix to send the mail goes fine
|> > mpop to get the mail goes fine from the command line
|> > dovecot to allow others connected to pop their mail also goes fine
|> > I did not use fetchmail because the server is on the command line, and thus no fetchconf (I got cold feet at that stage), getmail not available on apt-get from ubuntu, but mpop was so installed that.
|> > mpop works fine from the command line. As it does not have a daemon, you are supposed to put a line into crontab which I have done. Problem ...
|> > I really don't think that cron is working although I think crond is loaded as can do etc/init.d/cron start/stop/reload . My line in crontab:
|> On debian when doing a "ps aux" i find a proces "/usr/sbin/cron" which
|> is running, and crontab is acting as usual. On this system i have no
|> regular items (desktop), and cannot check on a server (those are
|> > 2 * * * * root /usr/bin/mpop -q anotheranne
|> > #
|> My understanding is you have one go every hour, at 2 minutes passed the
|> hour. from "man 5 crontab":
I took a leaf and studied the man 5 crontab which is more specific than the abbreviated entry in my Debian Bible.
My understanding now is that the crontab time fields represent specific times, not intervals as I thought. Thus
0-59/2 ---> */2 represents all the times calculateable throughout the day from 0:00 to 23:58 in 2 minute steps.
Your paragraph below illegible as you may see :(
|> Step values can be used in conjunction with ranges. Following a range
|> with ââ/<number>ââ specâifies skips of the numberâs value through the
|> range. For example, ââ0-23/2ââ can be used in the hours field to
|> specify command execution every other hour (the alternative in the V7
|> standard is ââ0,2,4,6,8,10,12,14,16,18,20,22ââ). Steps are also
|> permitted after an asterisk, so if you want to say ââevery two hoursââ,
|> just use ââ*/2ââ.
|> Thus every 2 minutes would be */2 in the minute field ;)
there is more to a correct cron entry than meets the eye ;)
The user does have to be 'anotheranne' - it doesn't go with user 'root'.
So for my next problem .....
thanks to all
|> > even if the user is anotheranne, nothing happens, and I do have the newline after this last entry as needed.
|> One way to test cron, is to use the mailto proggy. This way you can mail
|> something from crontab and be certain you will get it (if cron is indeed
|> > there is nothing in /etc/cron.hourly which I would have expected as m/c on all day
|> > crontab has lines referencing anacron which is not installed that I can find (well, likely not installed on a server?)
|> > any suggestion as to what may be broken? (i really have spent hours today trying to sort this)
|> > My Debian bible says that cron does not work if not running 24/7 and that is why debian uses anacron, but I don't really understand this and after all I am calling for a 2 minute cycle on mpop so surely it should go?
|> > sysvconfig confirms cron ready to go as far as runlevels go.
|> > thanks
|> > Anne
so much to do, so little time :(
More information about the Techtalk